.app-shell {
    width: 100%;
    max-width: 680px;
    min-height: 100vh;
    margin: 0 auto;
    background: #f3f6fb;
    box-shadow: 0 0 32px rgba(23, 32, 51, 0.08);
}

.app-header {
    padding: 1rem 0;
}

.app-header .container-fluid > .d-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
}

.app-title {
    font-size: 1.4rem;
}

.top-nav {
    flex-wrap: wrap;
    gap: 0.45rem;
}

.nav-pill {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
}

.app-main > .content.container-fluid {
    padding: 0.85rem 1rem 2rem;
}

.tile-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0;
}

.tile {
    padding: 1rem;
}

.earnings-toolbar,
.symbol-toolbar {
    padding: 0.65rem 0.75rem;
}

.earnings-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0.65rem 0.75rem;
}

.positions-table-wrap {
    max-width: 100%;
}

.position-group {
    margin-bottom: 1rem;
}

.position-group-title {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.positions-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: clamp(0.55rem, 2.4vw, 0.72rem);
}

.positions-table th,
.positions-table td {
    overflow: hidden;
    padding: 0.25rem 0.12rem;
    text-overflow: ellipsis;
}

.combination-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.combination-table th,
.combination-table td {
    padding-right: 0.3rem;
    padding-left: 0.3rem;
}

.combination-table .quantity-column {
    width: 2.5rem;
}

.combination-row {
    cursor: pointer;
}

.combination-row:hover,
.combination-row:focus {
    outline: 2px solid #bfd4f6;
    outline-offset: -2px;
}

.combination-detail-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

@media (max-width: 600px) {
    .combination-detail-table {
        width: 100%;
        table-layout: fixed;
        font-size: clamp(0.55rem, 2.4vw, 0.72rem);
    }

    .combination-detail-table th,
    .combination-detail-table td {
        overflow: hidden;
        padding: 0.25rem 0.12rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .combination-detail-table th:nth-child(1) {
        width: 12%;
    }

    .combination-detail-table th:nth-child(2) {
        width: 8%;
    }

    .combination-detail-table th:nth-child(3) {
        width: 16%;
    }

    .combination-detail-table th:nth-child(4) {
        width: 9%;
    }

    .combination-detail-table th:nth-child(5) {
        width: 17%;
    }

    .combination-detail-table th:nth-child(6),
    .combination-detail-table th:nth-child(7) {
        width: 19%;
    }
}

.unrealized-value {
    font-weight: 700;
}

.unrealized-positive {
    color: #198754 !important;
}

.unrealized-negative {
    color: #dc3545 !important;
}

.hero-card,
.detail-card,
.breakdown-card,
.legs-card {
    padding: 1rem;
    border-radius: 0.85rem;
}

.open-positions-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.open-positions-summary h2 {
    margin: 0;
    font-size: 0.95rem;
}

.open-positions-summary p {
    font-size: 0.8rem;
}

.mpos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 380px) {
    .mpos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
