/* Cripto 50 — CSS deliberadamente compatible con Safari de iOS 9 (iPad 2). */
* { box-sizing: border-box; }
html { min-height: 100%; background: #07101f; }
body {
  min-height: 100%; margin: 0; color: #eef3ff; background: #07101f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px; -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: rgba(0,0,0,0); }
[hidden] { display: none !important; }

.topbar {
  min-height: 82px; padding: 15px 22px; background: #0b1428; border-bottom: 1px solid #24314a;
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center;
  -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between;
}
.brand-block { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }
.logo-mark {
  width: 46px; height: 46px; line-height: 46px; margin-right: 12px; border-radius: 13px;
  color: #081020; background: #f3ba2f; text-align: center; font-size: 27px; font-weight: bold;
  box-shadow: 0 7px 18px rgba(243,186,47,.22);
}
h1 { margin: 0 0 3px; font-size: 24px; line-height: 1.05; letter-spacing: -.3px; }
.brand-block p { margin: 0; color: #97a6c3; font-size: 13px; }
.status-block { color: #b4c0d8; white-space: nowrap; }
.live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: #eab308; }
.live-dot.ok { background: #24d17e; box-shadow: 0 0 0 4px rgba(36,209,126,.12); }
.live-dot.error { background: #ff6070; }
.small-button {
  min-height: 36px; margin-left: 13px; padding: 7px 13px; color: #eaf0ff; background: #192741;
  border: 1px solid #354665; border-radius: 8px; cursor: pointer;
}
.small-button:active { background: #253858; }
.small-button[disabled] { opacity: .55; cursor: default; }

main { max-width: 1400px; margin: 0 auto; padding: 18px 20px 28px; }
.summary { margin: 0 -6px 14px; overflow: hidden; }
.summary-card {
  float: left; width: 33.333%; min-height: 76px; padding: 15px 17px; border: 6px solid #07101f;
  background: #101b30; border-radius: 14px;
}
.summary-label { display: block; margin-bottom: 7px; color: #91a0bc; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.summary-card strong { font-size: 21px; font-weight: 700; }
.summary:after, .controls:after { display: table; clear: both; content: ""; }

.controls { margin-bottom: 12px; }
.controls label { float: left; margin: 10px 9px 0 0; color: #9faeca; font-size: 13px; }
.controls input {
  float: left; width: 255px; height: 39px; padding: 8px 12px; color: #eef3ff; background: #0e192d;
  border: 1px solid #2b3b58; border-radius: 9px; outline: 0;
  -webkit-appearance: none; appearance: none;
}
.controls input:focus { border-color: #4d8df7; box-shadow: 0 0 0 3px rgba(77,141,247,.14); }
.last-updated { float: right; padding-top: 10px; color: #7787a4; font-size: 12px; }
.error-box { margin: 0 0 12px; padding: 12px 14px; color: #ffd8dc; background: #3a1720; border: 1px solid #6a2936; border-radius: 10px; line-height: 1.45; }

.market-panel { overflow: hidden; background: #0d172a; border: 1px solid #21304a; border-radius: 14px; box-shadow: 0 14px 45px rgba(0,0,0,.18); }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 970px; border-collapse: collapse; table-layout: fixed; }
th { height: 44px; padding: 0 10px; color: #8796b1; background: #111d33; border-bottom: 1px solid #283750; font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .35px; }
td { height: 66px; padding: 7px 10px; border-bottom: 1px solid #1b2940; vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr:focus { background: #131f36; }
tbody tr:active { background: #192943; }
tbody tr:last-child td { border-bottom: 0; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.rank-col { width: 45px; text-align: center; color: #7989a6; }
.coin-col { width: 190px; }
.market-cap-col { width: 140px; }
.volume-col { width: 135px; }
.chart-col { width: 145px; text-align: center; }
.coin-cell { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }
.coin-cell img { width: 32px; height: 32px; margin-right: 10px; border-radius: 50%; background: #1b2940; }
.coin-name { display: block; max-width: 125px; overflow: hidden; color: #f2f5fd; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.coin-symbol { display: block; margin-top: 3px; color: #7888a6; font-size: 11px; text-transform: uppercase; }
.price { color: #f5f7fc; font-weight: 650; }
.positive { color: #2dd58a !important; }
.negative { color: #ff6676 !important; }
.neutral { color: #93a2bc !important; }
.sparkline { display: block; width: 120px; height: 36px; margin: 0 auto; }
.trend-pill { display: inline-block; min-width: 76px; padding: 7px 8px; border-radius: 8px; background: #132139; text-align: center; font-weight: 650; }
.loading-row td, .empty-row td { height: 180px; color: #93a2bd; text-align: center; cursor: default; }
.spinner { display: inline-block; width: 15px; height: 15px; margin-right: 8px; border: 2px solid #52617a; border-top-color: #6ca2ff; border-radius: 50%; vertical-align: -3px; -webkit-animation: spin .85s linear infinite; animation: spin .85s linear infinite; }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
@keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
.disclaimer { margin: 12px 2px 0; color: #657590; font-size: 11px; line-height: 1.4; }

.modal { position: fixed; z-index: 100; top: 0; right: 0; bottom: 0; left: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(3,8,17,.84); }
.modal-card {
  position: relative; z-index: 1; width: 90%; max-width: 940px; min-height: 540px; margin: 5vh auto; padding: 24px;
  background: #0e192c; border: 1px solid #2a3a57; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.close-button { position: absolute; z-index: 2; top: 12px; right: 14px; width: 40px; height: 40px; color: #adbad0; background: transparent; border: 0; font-size: 33px; line-height: 34px; cursor: pointer; }
.detail-header { min-height: 62px; padding-right: 42px; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; }
.detail-header img { width: 44px; height: 44px; margin-right: 12px; border-radius: 50%; background: #1b2940; }
.detail-header h2 { margin: 0 0 4px; font-size: 24px; }
.detail-symbol { color: #8493ae; font-size: 12px; text-transform: uppercase; }
.detail-price-block { margin-left: auto; text-align: right; }
.detail-price-block strong { display: block; font-size: 23px; }
.detail-price-block span { display: block; margin-top: 4px; font-weight: 600; }
.range-buttons { margin: 22px 0 14px; padding: 4px; overflow: hidden; background: #101d33; border: 1px solid #263652; border-radius: 10px; }
.range-buttons button { float: left; width: 16.666%; min-height: 38px; padding: 7px 4px; color: #92a2be; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.range-buttons button.active { color: #fff; background: #326bd1; box-shadow: 0 3px 10px rgba(50,107,209,.25); }
.chart-summary { overflow: hidden; margin: 0 -5px 10px; }
.chart-summary div { float: left; width: 33.333%; padding: 5px; }
.chart-summary span { display: block; color: #7e8eaa; font-size: 11px; text-transform: uppercase; }
.chart-summary strong { display: block; margin-top: 4px; font-size: 15px; }
.chart-wrap { position: relative; height: 300px; border-radius: 10px; background: #0a1425; overflow: hidden; }
#price-chart { display: block; width: 100%; height: 300px; }
.chart-loading { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding-top: 138px; color: #8e9db8; background: rgba(10,20,37,.88); text-align: center; }
.chart-tooltip { position: absolute; z-index: 3; min-width: 140px; padding: 8px 10px; color: #f4f7ff; background: #1b2a43; border: 1px solid #405477; border-radius: 7px; font-size: 12px; line-height: 1.5; pointer-events: none; box-shadow: 0 5px 18px rgba(0,0,0,.3); }
.chart-axis { padding-top: 6px; overflow: hidden; color: #657590; font-size: 11px; }
.chart-axis span:first-child { float: left; }
.chart-axis span:last-child { float: right; }
.chart-note { min-height: 16px; margin: 8px 0 0; color: #71819d; font-size: 11px; }
body.modal-open { overflow: hidden; }

@media (max-width: 800px) {
  .topbar { padding: 12px 14px; }
  .brand-block p { display: none; }
  .status-block #status-text { display: none; }
  main { padding: 14px 10px 22px; }
  .summary-card { min-height: 70px; padding: 12px; }
  .summary-card strong { font-size: 17px; }
  .modal-card { width: 96%; min-height: 520px; margin: 2vh auto; padding: 18px 14px; }
  .chart-wrap, #price-chart { height: 270px; }
  .chart-loading { padding-top: 123px; }
}
@media (max-width: 600px) {
  .summary-card { width: 100%; border-width: 3px 6px; }
  .controls input { width: 220px; }
  .last-updated { float: left; clear: both; padding: 8px 0 0 50px; }
  .detail-price-block { clear: both; }
  .range-buttons button { width: 33.333%; }
}
