body { background: #0f172a; color: #f1f5f9; font-family: sans-serif; padding: 15px; margin: 0; }
.card { background: #1e293b; padding: 15px; border-radius: 12px; border: 1px solid #334155; margin-bottom: 15px; }
.back-btn { display: inline-block; margin-bottom: 15px; color: #38bdf8; text-decoration: none; font-weight: bold; }
table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
th { text-align: left; color: #94a3b8; border-bottom: 1px solid #334155; padding: 8px; }
td { padding: 8px; border-bottom: 1px solid #334155; }

/* index styles */
body { font-size: 13px; }
.nav { display: flex; gap: 8px; margin: 10px 0; }
.btn { flex: 1; text-align: center; padding: 12px 6px; background: #1e293b; border-radius: 10px; text-decoration: none; color: white; border: 1px solid #334155; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; font-weight: bold; }
.btn span { font-size: 0.75em; font-weight: normal; margin-top: 4px; color: inherit; }
.btn.active { background: #38bdf8; color: #0f172a; border-color: #38bdf8; }
.summary-bar { background: #0f172a; padding: 15px; border-radius: 12px; border: 1px solid #334155; display: flex; justify-content: space-between; margin-bottom: 15px; gap: 10px; flex-wrap: wrap; }
.summary-item { flex: 1; min-width: 130px; }
.card { background: #1e293b; padding: 15px; border-radius: 14px; border: 1px solid #334155; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: #94a3b8; border-bottom: 1px solid #334155; padding: 10px; font-size: 0.75em; }
td { padding: 12px 10px; border-bottom: 1px solid #334155; vertical-align: top; }
@media (max-width: 600px) { .hide-mobile { display: none; } .summary-bar { flex-direction: column; gap: 8px; } }
.up { color: #4ade80; } .down { color: #fb7185; } .purple { color: #c084fc; }
.critical { background: rgba(251, 113, 133, 0.1); border-left: 3px solid #fb7185; }
.mono { font-family: monospace; font-size: 1.1em; }
.qty-label { font-size: 0.75em; color: #94a3b8; margin-top: 2px; }
.strat-label { font-size: 0.85em; color: #38bdf8; margin-top: 4px; }
.status-icon-only { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; font-size: 1.3rem; line-height: 1; border-radius: 50%; border: none; background: transparent; box-shadow: none; color: #f1f5f9; position: relative; top: 0; z-index: 2; }
.status-pending,
.status-ordered,
.status-closed,
.status-stop,
.status-unknown {
    background: transparent !important;
    border-color: transparent !important;
    color: #f1f5f9 !important;
    box-shadow: none !important;
}
.status-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    font-size: 1rem;
    border-radius: 0.35rem;
}
.status-pending::before,
.status-ordered::before,
.status-closed::before,
.status-stop::before,
.status-unknown::before {
    content: none !important;
}

@keyframes pulse-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(1.02); }
}

.blink-price {
    display: inline-block;
    animation: pulse-blink 1.2s ease-in-out infinite;
    color: #facc15;
    font-weight: bold;
}

.detail-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.detail-meta {
    color: #94a3b8;
    font-size: 0.95rem;
}

.detail-summary {
    margin-top: 16px;
}

.detail-summary table {
    width: 100%;
    border-collapse: collapse;
}

.detail-summary th,
.detail-summary td {
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    text-align: left;
    font-size: 0.92rem;
}

.detail-summary th {
    color: #94a3b8;
    background: rgba(255,255,255,0.03);
}

.detail-summary td strong {
    display: block;
    margin-bottom: 4px;
}

.detail-note {
    font-size: 0.95rem;
}

.status-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    margin-right: 0.35rem;
}

.pull-refresh-indicator {
    position: fixed;
    top: -56px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    transition: top 0.18s ease;
    pointer-events: none;
}

.pull-refresh-indicator.visible {
    top: calc(env(safe-area-inset-top, 0px) + 2px);
}

body.pull-refresh-enabled {
    padding-top: calc(30px + env(safe-area-inset-top, 0px));
}

.pull-refresh-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: #38bdf8;
    transform: rotate(0deg);
}

.pull-refresh-indicator.loading .pull-refresh-spinner {
    animation: pull-refresh-spin 0.8s linear infinite;
}

@keyframes pull-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
