/* HashOps dashboard in the original visual language.
   theme.css (the original design system) sets the look; app.css lays out
   the dashboard's views; this file maps app.css onto the original palette,
   type and components, and turns the section list into the original
   pill tabs under the page header. */

:root {
  --bg-deep: #0b0d11;
  --surface-3: #1b1f26;
  --line-strong: rgba(255,255,255,.16);
  --brass: #4ee1ff;
  --brass-strong: #8debff;
  --brass-soft: rgba(78,225,255,.1);
  --tide: #69e6a6;
  --tide-soft: rgba(105,230,166,.08);
  --coral: #ff6b6b;
  --coral-soft: rgba(255,107,107,.08);
  --amber-soft: rgba(244,184,96,.08);
  --sky: #7c6cf5;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --display: var(--sans);
}

/* helpers the original design system did not have */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.up { color: var(--green); }
.down { color: var(--red); }
.form-success { color: var(--green); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text); cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--cyan); flex: 0 0 auto; }
input.input, select.input, textarea.input {
  min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #0b0d11; color: var(--text); font-family: var(--sans); font-size: 14px;
}
textarea.input { min-height: 96px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.input:focus { outline: none; border-color: rgba(78,225,255,.4); }
select option { background: #14161b; color: var(--text); }
.field textarea { min-height: 96px; }
.field-hint a, .auth-switch a, .text-link { color: var(--cyan); }
h1, h2, h3, h4 { font-family: var(--sans); color: var(--text); }

/* ------------------------------------------------------------ page frame */
.app-page .nav { padding: 0 10px 0 15px; }
.app-shell { padding: 130px 0 80px; }
.app-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; }
.app-head > div:first-child { min-width: 0; }
.app-head h1 { margin: 6px 0 0; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.app { display: block; min-height: 0; }
.main { padding: 0; }
.view { max-width: none; }
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #1a0505; font: 700 9px/16px var(--mono); text-align: center; }

/* plan summary: a row of chips beside the name, like the original user chips */
.plan-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; background: none; font-size: 12px; }
.plan-card b { display: inline-flex; align-items: center; margin: 0; padding: 6px 12px; border: 1px solid rgba(78,225,255,.3); border-radius: 99px; color: var(--cyan); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.plan-card span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 500 11px var(--mono); }
.plan-card .button { width: auto; min-height: 34px; margin: 0; padding: 0 14px; font-size: 12px; }

/* ------------------------------------------------------------ section tabs */
.side.tabs { position: static; height: auto; overflow: visible; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 30px; padding: 0; border: 0; background: none; }
.side-group { display: contents; }
.side-group h2 { display: none; }
.side a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); color: var(--muted); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.side a:hover { color: var(--text); background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.16); }
.side a.active { color: #071014; background: #dffbff; border-color: #c8f8ff; box-shadow: none; }
.side .count { position: absolute; top: -7px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #1a0505; font: 700 9px/16px var(--mono); text-align: center; }
/* notifications and community already sit in the top bar */
.side a[data-view-link="notificaciones"], .side a[href="community.html"] { display: none; }
#side-team[style*="none"] { display: none !important; }
.plan-card span:empty { display: none; }

/* remaining colours of app.css in the original palette */
.notif-item.unread, .conv-row.unread { border-color: rgba(78,225,255,.35); background: rgba(78,225,255,.05); }
.notice-banner, .mk-error { border-color: rgba(255,107,107,.35); }
.payment-copy-btn.copied { border-color: rgba(105,230,166,.45); }
.status-pill.open { border-color: rgba(105,230,166,.4); }
.mk-live-warn { border-color: rgba(244,184,96,.45); }
/* the bell shows which view is open when notifications are on screen */
body.view-notificaciones .bell-btn { color: #071014; background: #dffbff; border-color: #c8f8ff; }
/* admin plan prices: room for the full amount */
input[data-f="amount"] { width: 150px !important; }

/* ---------------------------------------------------------------- panels */
.view-head { margin-bottom: 20px; }
.view-head h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.02em; }
.view-head p { color: var(--muted); font-size: 13px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #101216; padding: 26px; margin-bottom: 26px; }
.panel-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.panel-head .lede { font-size: 13px; }
.lede { font-size: 15px; }
.empty-note { font-size: 13px; }
.kv { font-size: 13px; }
table.data-table { font-size: 13px; }
table.data-table th { color: var(--faint); font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
table.data-table td { padding: 12px; }
.button { min-height: 46px; font-size: 13px; }
.small-btn, .button.small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.status { padding: 6px 10px; font: 500 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.status.ok { color: #91e9b9; border: 1px solid rgba(105,230,166,.17); background: rgba(105,230,166,.06); }
.status.warn { color: #ffd899; border: 1px solid rgba(244,184,96,.22); background: rgba(244,184,96,.07); }
.status.bad { color: #ffb3b3; border: 1px solid rgba(255,107,107,.22); background: rgba(255,107,107,.07); }
.modal-box { background: #101216; border-radius: var(--radius); }
.notice-banner { border-radius: 14px; }

@media (max-width: 1100px) {
  /* the bell sits in the collapsed menu here: keep notifications (and its count) among the tabs */
  .side a[data-view-link="notificaciones"] { display: inline-flex; }
}
@media (max-width: 960px) {
  .app-shell { padding-top: 110px; }
  .side a { padding: 9px 12px; font-size: 11px; }
  .nav-links .bell-btn { justify-content: space-between; }
}
@media (max-width: 767px) {
  .panel { padding: 20px; }
  .app-head { margin-bottom: 22px; }
}

/* ---------------------------------------------- market panels (original look) */
.mk-disclaimer { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border: 1px solid rgba(244,184,96,.28); border-radius: 12px; background: rgba(244,184,96,.06); color: #e9d6b4; font-size: 12.5px; line-height: 1.55; }
.mk-disclaimer b { color: var(--amber); font: 700 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; padding-top: 2px; }
.mk-preview { display: inline-block; margin-bottom: 14px; padding: 4px 10px; border: 1px solid rgba(124,108,245,.35); border-radius: 99px; color: var(--violet); font: 500 11px var(--mono); }
.mk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 26px; }
.mk-card { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #101216; padding: 16px; color: inherit; cursor: pointer; min-width: 0; }
.mk-card:hover { border-color: rgba(78,225,255,.35); }
.mk-card.active { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan-soft) inset; }
.mk-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mk-sym { font: 700 13px var(--mono); letter-spacing: .04em; }
.mk-trend { font: 500 9.5px var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--faint); white-space: nowrap; }
.mk-trend-up { color: var(--green); border-color: rgba(105,230,166,.3); }
.mk-trend-down { color: var(--red); border-color: rgba(255,107,107,.3); }
.mk-trend-stale { color: var(--amber); border-color: rgba(244,184,96,.35); }
.mk-price { font: 600 22px var(--mono); letter-spacing: -.02em; margin: 10px 0 6px; overflow-wrap: anywhere; }
.mk-row { display: flex; gap: 8px; align-items: baseline; font: 500 11px var(--mono); color: var(--faint); margin-bottom: 10px; flex-wrap: wrap; }
.mk-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 11.5px; }
.mk-kv dt { color: var(--faint); font-weight: 400; }
.mk-kv dd { margin: 0; text-align: right; font-family: var(--mono); }
.mk-kv-wide { font-size: 13px; gap: 9px 16px; }
.mk-up { color: var(--green); }
.mk-down { color: var(--red); }
.mk-muted { color: var(--faint); }
.mk-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-toolbar select { width: auto; min-height: 36px; }
.mk-iv { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font: 500 11px var(--mono); cursor: pointer; }
.mk-iv.active { color: #071014; background: #dffbff; border-color: #c8f8ff; }
.mk-chart-wrap { position: relative; height: 420px; }
.mk-chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 13px; text-align: center; padding: 20px; z-index: 2; pointer-events: none; }
.mk-split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.mk-foot { margin-top: 12px; color: var(--faint); font: 400 11px var(--mono); overflow-wrap: anywhere; }
.mk-scen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mk-scen { border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; border-left-width: 3px; }
.mk-scen.bull { border-left-color: var(--green); }
.mk-scen.bear { border-left-color: var(--red); }
.mk-scen .mk-card-head { flex-wrap: wrap; }
.mk-scen .mk-kv { grid-template-columns: minmax(0, 1.4fr) auto; }
.mk-scen-title { font-weight: 600; font-size: 15px; margin: 8px 0 10px; }
.mk-pat { display: grid; grid-template-columns: 70px 44px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mk-pat:last-child { border-bottom: none; }
.mk-pat > * { min-width: 0; overflow-wrap: anywhere; }
.mk-pat-time { font: 400 11px var(--mono); text-align: right; }
.mk-subhead { margin: 16px 0 8px; color: var(--faint); font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.mk-marks { display: inline-flex; gap: 6px; align-items: center; color: var(--faint); font: 500 11px var(--mono); cursor: pointer; }
.mk-marks input { width: auto; height: auto; }
.mk-lab-row { cursor: pointer; }
.mk-lab-row:hover td { background: rgba(255,255,255,.02); }
.mk-lab-table td { font-size: 12px; }
.mk-lab-detail td { background: rgba(78,225,255,.03); font-size: 12px; line-height: 1.7; }
.mk-lab-detail code { font-size: 11px; overflow-wrap: anywhere; }
.mk-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font: 400 11px var(--mono); }
.mk-pager-btns { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mk-pager-num { color: var(--muted); padding: 0 6px; }
.mk-iv:disabled { opacity: .35; cursor: default; }
.mk-nowrap { white-space: nowrap; }
.mk-near { color: var(--amber); }
.mk-scroll { max-height: 440px; overflow-y: auto; }
.mk-scroll thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mk-runs-table td { vertical-align: top; }
.mk-runs-table td:nth-child(5) { min-width: 190px; }
@media (max-width: 767px) {
  .mk-pat { grid-template-columns: 56px 36px 1fr; }
  .mk-pat-time { grid-column: 1 / -1; text-align: left; }
}
.mk-live-warn { border: 1px solid rgba(255,209,102,.45); background: rgba(255,209,102,.08); color: #ffd166; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 12px; line-height: 1.6; }
.mk-live-scroll { max-height: 520px; overflow-y: auto; }
.mk-al-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 0 0 14px; }
.mk-al-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12px; min-width: 0; }
.mk-al-card h3 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-al-card label { display: block; margin: 8px 0 4px; color: var(--faint); }
.mk-al-card input[type=text], .mk-al-card input[type=password], .mk-al-opts input[type=text], .mk-al-opts select { width: 100%; box-sizing: border-box; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: 500 12px var(--mono); }
.mk-al-opts select option { background: #0d1117; }
.mk-al-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.mk-al-row .button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.mk-al-how { margin: 8px 0 0; padding-left: 18px; color: var(--faint); line-height: 1.5; }
.mk-al-chk { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; color: inherit !important; cursor: pointer; }
.mk-al-chk input { width: auto; height: auto; }
.mk-al-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 14px; font-size: 12px; }
.mk-al-opts label { display: block; margin: 0 0 4px; color: var(--faint); }
.mk-al-matrix td, .mk-al-matrix th { text-align: center; }
.mk-al-matrix td:first-child, .mk-al-matrix th:first-child { text-align: left; }
.mk-al-ok { color: var(--green, #3ddc97); }
.mk-al-bad { color: #ff6b6b; }
.mk-bars { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.mk-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; font-size: 12px; }
.mk-bar-row label { min-width: 260px; }
.mk-bar-row input { width: 160px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: 500 13px var(--mono); }
.mk-bar-row .button { min-height: 34px; padding: 0 12px; font-size: 12px; }
.mk-paper-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 12px; }
.mk-paper-form input { width: 160px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: 500 13px var(--mono); }
.mk-paper-form .button { min-height: 36px; padding: 0 12px; font-size: 12px; }
.mk-paper-spark { display: block; width: 100%; height: 70px; margin: 4px 0 6px; }
.mk-paper-spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.mk-paper-spark .mk-paper-up { stroke: var(--green); }
.mk-paper-spark .mk-paper-down { stroke: var(--red); }
.mk-paper-spark .mk-paper-base { stroke: var(--line); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.mk-god-panel.on { border-color: rgba(255,209,102,.45); box-shadow: 0 0 0 1px rgba(255,209,102,.12) inset; }
.mk-god-state { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--mono); letter-spacing: .04em; }
.mk-god-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.mk-god-state.on .mk-god-dot { background: #ffd166; animation: mk-god-pulse 1.4s ease-in-out infinite; }
.mk-god-state.on { color: #ffd166; }
@keyframes mk-god-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .mk-god-state.on .mk-god-dot { animation: none; }
}
.mk-god-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0 14px; }
.mk-god-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mk-god-tile b { display: block; font: 600 18px var(--mono); margin-top: 4px; }
.mk-god-tile span { font-size: 11px; color: var(--muted); }
.mk-god-bar { height: 6px; border-radius: 3px; background: rgba(149,157,168,.2); overflow: hidden; margin: 6px 0 4px; }
.mk-god-bar i { display: block; height: 100%; background: #ffd166; }
.mk-god-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) {
  .mk-god-cols { grid-template-columns: 1fr; }
}
.mk-prog { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mk-prog-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 4px; }
.mk-prog-bar { width: 100%; background: rgba(149,157,168,.35); border-radius: 2px 2px 0 0; }
.mk-prog-bar.near { background: var(--amber); }
.mk-prog-bar.ok { background: var(--green); }
.mk-prog-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--red); pointer-events: none; }
.mk-prog-line span { position: absolute; right: 0; top: -16px; font: 500 10px var(--mono); color: var(--red); }
.mk-error { display: none; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; margin-bottom: 18px; border: 1px solid rgba(255,107,107,.3); border-radius: 12px; color: #ffb3b3; font-size: 13px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .mk-split { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 767px) {
  .mk-chart-wrap { height: 320px; }
  .mk-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
