/* Poshmark Seller Hub: tool styles, scoped under .posh so the generic
   class names (.card, .row, .btn, .panel…) never leak into the site
   nav/footer. Built on its own token set (a near-match of site.css)
   declared on the .posh root; custom properties inherit to descendants. */

.posh {
    --p-bg: #0B0E14;
    --p-card: #12161F;
    --p-card2: #171C27;
    --p-ink: #E7EAF2;
    --p-mute: #8B93A7;
    --p-line: #232938;
    --p-accent: #6C8AFF;
    --p-accent-dim: rgba(108, 138, 255, .14);
    --p-accent-border: rgba(108, 138, 255, .35);
    --p-sage: #4ADE80;
    --p-sagebg: rgba(74, 222, 128, .12);
    --p-amber: #F0B95A;
    --p-amberbg: rgba(240, 185, 90, .12);
    --p-neg: #F87171;
    --p-mono: "JetBrains Mono", ui-monospace, monospace;

    color: var(--p-ink);
    font-size: 15px;
}

    .posh * {
        box-sizing: border-box;
    }

    .posh .posh-topbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .posh .eyebrow {
        font-family: var(--p-mono);
        font-size: 10.5px;
        letter-spacing: .18em;
        text-transform: uppercase;
        color: var(--p-accent);
    }

    .posh h1 {
        margin: 3px 0 0;
        font-size: 21px;
        font-weight: 800;
        letter-spacing: -.02em;
        color: var(--p-ink);
    }

    .posh .posh-nav {
        display: flex;
        gap: 2px;
        margin-top: 16px;
        border-bottom: 1px solid var(--p-line);
    }

    .posh .posh-nav button {
        padding: 10px 16px;
        border: none;
        font: inherit;
        font-size: 13.5px;
        font-weight: 600;
        background: transparent;
        color: var(--p-mute);
        border-radius: 10px 10px 0 0;
        cursor: pointer;
        border-bottom: 2px solid transparent;
    }

        .posh .posh-nav button.on {
            color: var(--p-accent);
            border-bottom-color: var(--p-accent);
            background: var(--p-accent-dim);
        }

    .posh .posh-main {
        padding-top: 18px;
    }

    .posh .card {
        background: var(--p-card);
        border: 1px solid var(--p-line);
        border-radius: 12px;
    }

    .posh .stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        margin-bottom: 14px;
    }

    .posh .stat {
        padding: 10px 12px;
    }

        .posh .stat .k {
            font-family: var(--p-mono);
            font-size: 9px;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: var(--p-mute);
            font-weight: 500;
        }

        .posh .stat .v {
            font-size: 19px;
            font-weight: 700;
            margin-top: 3px;
            letter-spacing: -.01em;
        }

    .posh .controls {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 12px;
    }

    .posh .seg {
        display: flex;
        background: var(--p-card);
        border: 1px solid var(--p-line);
        border-radius: 8px;
        overflow: hidden;
    }

        .posh .seg button {
            padding: 8px 12px;
            border: none;
            font: inherit;
            font-size: 13px;
            font-weight: 600;
            background: transparent;
            color: var(--p-mute);
            cursor: pointer;
            text-transform: capitalize;
        }

            .posh .seg button.on {
                background: var(--p-accent);
                color: #0B0E14;
            }

    .posh input,
    .posh select,
    .posh textarea {
        width: 100%;
        padding: 9px 11px;
        border: 1px solid var(--p-line);
        border-radius: 8px;
        font: inherit;
        font-size: 14px;
        color: var(--p-ink);
        background: var(--p-card2);
        outline: none;
    }

        .posh input:focus,
        .posh select:focus,
        .posh textarea:focus {
            border-color: var(--p-accent);
        }

        .posh input::placeholder,
        .posh textarea::placeholder {
            color: #5A6275;
        }

        .posh input[type=date] {
            color-scheme: dark;
        }

    .posh label {
        display: block;
        font-family: var(--p-mono);
        font-size: 9.5px;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--p-mute);
        margin-bottom: 4px;
        font-weight: 500;
    }

    .posh .btn {
        padding: 9px 15px;
        border-radius: 8px;
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        border: none;
        background: var(--p-accent);
        color: #0B0E14;
    }

        .posh .btn.soft {
            background: var(--p-accent-dim);
            color: var(--p-accent);
        }

        .posh .btn.ghost {
            background: transparent;
            border: 1px solid var(--p-line);
            color: var(--p-accent);
        }

        .posh .btn.sm {
            padding: 5px 10px;
            font-size: 12.5px;
        }

        .posh .btn:disabled {
            opacity: .45;
            cursor: default;
        }

    .posh .item {
        padding: 12px;
        display: flex;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 9px;
    }

        .posh .item.stale {
            border-left: 3px solid var(--p-amber);
        }

    .posh .thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
        background: var(--p-card2);
        flex-shrink: 0;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        border: 1px solid var(--p-line);
    }

        .posh .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .posh .ibody {
        flex: 1;
        min-width: 0;
    }

    .posh .trow {
        display: flex;
        gap: 7px;
        align-items: center;
        flex-wrap: wrap;
    }

        .posh .trow strong {
            font-size: 14.5px;
        }

    .posh .pill {
        font-family: var(--p-mono);
        font-size: 9.5px;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 99px;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

        .posh .pill.sold {
            background: var(--p-sagebg);
            color: var(--p-sage);
        }

        .posh .pill.listed {
            background: var(--p-accent-dim);
            color: var(--p-accent);
        }

        .posh .pill.sourced,
        .posh .pill.stale {
            background: var(--p-amberbg);
            color: var(--p-amber);
        }

    .posh .sub {
        font-size: 12px;
        color: var(--p-mute);
        margin-top: 2px;
    }

    .posh .meta {
        display: flex;
        gap: 12px;
        margin-top: 6px;
        flex-wrap: wrap;
        font-size: 12px;
        color: var(--p-mute);
    }

        .posh .meta b {
            color: var(--p-ink);
            font-weight: 600;
        }

    .posh .iright {
        text-align: right;
        flex-shrink: 0;
    }

    .posh .profit {
        font-size: 15px;
        font-weight: 700;
        font-family: var(--p-mono);
    }

        .posh .profit.pos {
            color: var(--p-sage);
        }

        .posh .profit.neg {
            color: var(--p-neg);
        }

    .posh .acts {
        margin-top: 7px;
        display: flex;
        gap: 5px;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .posh .empty {
        text-align: center;
        padding: 50px 16px;
        color: var(--p-mute);
    }

        .posh .empty .big {
            font-size: 36px;
            margin-bottom: 8px;
        }

    .posh a {
        color: var(--p-accent);
        font-weight: 600;
        font-size: 12.5px;
        text-decoration: none;
    }

        .posh a:hover {
            text-decoration: underline;
        }

    .posh .grid2 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 12px;
    }

    .posh .panel {
        padding: 16px;
    }

        .posh .panel h3 {
            margin: 0 0 6px;
            font-size: 14.5px;
            letter-spacing: -.01em;
        }

        .posh .panel p {
            margin: 0 0 12px;
            font-size: 13px;
            color: var(--p-mute);
            line-height: 1.55;
        }

            .posh .panel p b {
                color: var(--p-ink);
            }

    .posh .row {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        padding: 7px 0;
        border-bottom: 1px solid var(--p-line);
        font-size: 13.5px;
    }

        .posh .row span:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .posh .flash {
        padding: 10px 13px;
        margin-bottom: 12px;
        border-radius: 12px;
        font-weight: 600;
        font-size: 13.5px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

        .posh .flash.ok {
            background: var(--p-sagebg);
            color: var(--p-sage);
        }

        .posh .flash.bad {
            background: rgba(248, 113, 113, .12);
            color: var(--p-neg);
        }

        .posh .flash button {
            background: none;
            border: none;
            color: inherit;
            font-size: 16px;
            cursor: pointer;
        }

    .posh .chart {
        display: flex;
        align-items: flex-end;
        gap: 6px;
        height: 170px;
        padding-top: 8px;
    }

    .posh .bar {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 0;
    }

        .posh .bar .col {
            width: 100%;
            max-width: 44px;
            background: var(--p-accent);
            border-radius: 5px 5px 0 0;
            min-height: 2px;
        }

            .posh .bar .col.neg {
                background: var(--p-neg);
            }

        .posh .bar .bl {
            font-family: var(--p-mono);
            font-size: 9px;
            color: var(--p-mute);
            white-space: nowrap;
        }

        .posh .bar .bv {
            font-family: var(--p-mono);
            font-size: 9.5px;
            font-weight: 600;
        }

    .posh .modal-bg {
        position: fixed;
        inset: 0;
        background: rgba(4, 6, 10, .7);
        display: none;
        align-items: flex-start;
        justify-content: center;
        padding: 4vh 14px;
        overflow-y: auto;
        z-index: 200;
    }

        .posh .modal-bg.open {
            display: flex;
        }

    .posh .modal {
        background: var(--p-card);
        border: 1px solid var(--p-line);
        border-radius: 16px;
        padding: 18px;
        width: 100%;
        max-width: 540px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    }

        .posh .modal h2 {
            margin: 0 0 14px;
            font-size: 18px;
            letter-spacing: -.01em;
        }

    .posh .frow {
        display: grid;
        gap: 9px;
        margin-bottom: 12px;
    }

    .posh .c2 { grid-template-columns: 1fr 1fr; }
    .posh .c3 { grid-template-columns: 1fr 1fr 1fr; }
    .posh .c4 { grid-template-columns: repeat(4, 1fr); }

    .posh .netbox {
        background: var(--p-sagebg);
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 14px;
        color: var(--p-sage);
        font-weight: 600;
    }

    .posh .calcbox {
        background: var(--p-accent-dim);
        border: 1px solid var(--p-accent-border);
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
        color: var(--p-ink);
        line-height: 1.7;
    }

        .posh .calcbox b {
            color: var(--p-accent);
        }

    .posh .mfoot {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }

    .posh .photo-pick {
        width: 80px;
        height: 80px;
        border-radius: 10px;
        background: var(--p-card2);
        cursor: pointer;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11.5px;
        color: var(--p-accent);
        font-weight: 600;
        flex-shrink: 0;
        border: 1.5px dashed var(--p-accent-border);
        text-align: center;
    }

        .posh .photo-pick img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .posh .hide {
        display: none !important;
    }

@media (max-width: 560px) {
    /* Stack the closet card: thumbnail + details fill the width, and the
       profit/action buttons drop to a full-width row underneath, instead of
       a cramped right column that squeezes the title one word per line. */
    .posh .item {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "thumb body"
            "right right";
        gap: 10px 12px;
        align-items: start;
    }

        .posh .item .thumb { grid-area: thumb; }
        .posh .item .ibody { grid-area: body; }

        .posh .item .iright {
            grid-area: right;
            text-align: left;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
        }

            .posh .item .acts {
                margin-top: 0;
                justify-content: flex-end;
            }
}

@media (max-width: 480px) {
    .posh .c4 { grid-template-columns: 1fr 1fr; }
    .posh .c3 { grid-template-columns: 1fr 1fr; }
}
