﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0b1220;
    color: #f8fafc;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    padding-bottom: 310px;
}

.top {
    position: sticky;
    top: 0;
    z-index: 20;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding:
        calc(14px + env(safe-area-inset-top))
        16px
        14px;

    background: #111827;
    border-bottom: 1px solid #263244;
}

.title {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .5px;
}

.subtitle {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
}

.connection {
    font-size: 12px;
    font-weight: 700;
}

.connection.online {
    color: #22c55e;
}

.connection.offline {
    color: #ef4444;
}

.toolbar {
    display: flex;
    gap: 10px;
    padding: 14px;
}

.toolbar button {
    flex: 1;
}

button {
    border: 0;
    border-radius: 12px;
    padding: 14px;

    font-size: 15px;
    font-weight: 800;

    background: #334155;
    color: white;
}

button:active {
    transform: scale(.98);
}

button:disabled {
    opacity: .45;
}

.notify {
    background: #2563eb;
}

.readonly {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 14px;

    border-radius: 12px;

    background: #422006;
    color: #fbbf24;

    font-size: 12px;
    font-weight: 800;
}

.section-title {
    padding: 8px 14px;
    color: #94a3b8;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: .8px;
}

.card {
    margin: 10px 12px;
    padding: 15px;

    border-radius: 17px;

    background: #111827;
    border: 1px solid #263244;

    box-shadow:
        0 8px 22px rgba(0,0,0,.18);
}

.card.active {
    border-color: #2563eb;
}

.card.buy-card {
    border-left:
        5px solid #22c55e;
}

.card.sell-card {
    border-left:
        5px solid #ef4444;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;
}

.symbol {
    font-size: 22px;
    font-weight: 900;
}

.side {
    padding: 7px 12px;
    border-radius: 999px;

    font-weight: 900;
}

.side.buy {
    background: rgba(34,197,94,.15);
    color: #4ade80;
}

.side.sell {
    background: rgba(239,68,68,.15);
    color: #f87171;
}

.status {
    margin-top: 5px;

    font-size: 12px;
    color: #94a3b8;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px 16px;
}

.label {
    color: #94a3b8;
    font-size: 12px;
}

.value {
    margin-top: 2px;

    font-size: 17px;
    font-weight: 700;
}

.tp-list {
    display: grid;
    grid-template-columns:
        repeat(3,1fr);

    gap: 7px;

    margin-top: 14px;
}

.tp {
    padding: 10px 5px;

    border-radius: 10px;

    text-align: center;

    background: #1e293b;
}

.tp-name {
    color: #94a3b8;
    font-size: 11px;
}

.tp-value {
    margin-top: 3px;
    font-size: 16px;
    font-weight: 800;
}

.tp-status {
    margin-top: 4px;
    font-size: 10px;
    color: #94a3b8;
}

.source {
    margin-top: 12px;

    padding-top: 10px;

    border-top: 1px solid #263244;

    white-space: pre-line;

    color: #cbd5e1;
    font-size: 12px;
}

.loading {
    padding: 20px;
    color: #94a3b8;
    text-align: center;
}

.empty {
    margin: 10px 12px;
    padding: 20px;

    border-radius: 14px;

    background: #111827;

    color: #94a3b8;

    text-align: center;
}

.remote-panel {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 30;

    padding:
        10px
        12px
        calc(10px + env(safe-area-inset-bottom));

    background: rgba(15,23,42,.98);

    border-top:
        1px solid #334155;

    backdrop-filter:
        blur(12px);
}

.remote-label {
    margin-bottom: 8px;

    color: #94a3b8;

    font-size: 11px;
    font-weight: 800;

    text-align: center;
}

.remote-grid {
    display: grid;

    grid-template-columns:
        repeat(3,1fr);

    gap: 7px;
}

.remote-grid button {
    padding: 11px 5px;
    font-size: 12px;
}

.remote-grid .buy {
    background: #15803d;
}

.remote-grid .sell {
    background: #b91c1c;
}

.remote-grid .be {
    background: #0369a1;
}

.remote-grid .danger {
    background: #991b1b;
}

.phase-warning {
    margin-top: 8px;

    text-align: center;

    color: #fbbf24;

    font-size: 10px;
}

@media (min-width: 760px) {

    body {
        max-width: 620px;
        margin: auto;
    }

    .remote-panel {
        max-width: 620px;
        margin: auto;
    }
}
