/* ============================================================
   Orders â€” Redesign 2026 (lpoint)
   Aplicado apenas nas vistas com .vm-orders-modern wrapper.
   ============================================================ */

.vm-orders-modern {
    margin-bottom: 30px;
    --o-radius: 0;
    --o-radius-sm: 0;
    --o-bg: #ffffff;
    --o-bg-soft: #f6f7f9;
    --o-bg-soft-2: #eef0f4;
    --o-border: #e5e7eb;
    --o-text: #111827;
    --o-text-muted: #6b7280;
    --o-text-soft: #9ca3af;
    --o-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06);
    --o-shadow-sm: 0 1px 2px rgba(17, 24, 39, .06);
    --o-primary: #111827;
    --o-primary-contrast: #ffffff;
    --o-accent: #2563eb;

    /* Status palette */
    --o-st-wait: #f59e0b;     /* U - aguarda pagamento */
    --o-st-paid: #10b981;     /* C - paga */
    --o-st-prep: #3b82f6;     /* A - em preparaÃ§Ã£o */
    --o-st-ready: #8b5cf6;    /* D - pronta */
    --o-st-ship: #6366f1;     /* S - enviada */
    --o-st-done: #0ea5e9;     /* E - entregue */
    --o-st-cancel: #ef4444;   /* X - cancelada */

    color: var(--o-text);
    font-feature-settings: "ss01", "cv11";
}

.vm-orders-modern * { box-sizing: border-box; }

/* Override: remover todos os arredondamentos dentro da Ã¡rea de encomendas. */
.vm-orders-modern,
.vm-orders-modern *,
.vm-orders-modern *::before,
.vm-orders-modern *::after {
    border-radius: 0 !important;
}

.vm-orders-modern .o-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1.75rem;
}
.vm-orders-modern .o-page-header h1 {
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
}
.vm-orders-modern .o-page-header .o-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: var(--o-bg-soft);
    color: var(--o-text);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: background .15s ease;
}
.vm-orders-modern .o-page-header .o-back:hover { background: var(--o-bg-soft-2); }
.vm-orders-modern .o-page-header .o-back svg { width: 16px; height: 16px; }

/* ---- Empty state ---- */
.vm-orders-modern .o-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--o-bg-soft);
    border-radius: var(--o-radius);
}
.vm-orders-modern .o-empty svg { width: 56px; height: 56px; opacity: .35; margin-bottom: 1rem; }
.vm-orders-modern .o-empty p { color: var(--o-text-muted); margin: 0; }

/* ---- Order list (cards) ---- */
.vm-orders-modern .o-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: .85rem;
}
@media (min-width: 768px) {
    .vm-orders-modern .o-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
    .vm-orders-modern .o-list { grid-template-columns: repeat(3, 1fr); }
}

.vm-orders-modern .o-card {
    background: var(--o-bg);
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--o-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
}
.vm-orders-modern .o-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--o-shadow);
    border-color: #d1d5db;
}
.vm-orders-modern .o-card .o-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
}
.vm-orders-modern .o-card .o-order-num {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.vm-orders-modern .o-card .o-order-date {
    font-size: .8rem;
    color: var(--o-text-muted);
    margin-top: .15rem;
}
.vm-orders-modern .o-card .o-order-total {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: .25rem;
}
.vm-orders-modern .o-card .o-card-cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--o-accent);
    font-size: .88rem;
    font-weight: 600;
}
.vm-orders-modern .o-card .o-card-cta svg { width: 14px; height: 14px; transition: transform .15s ease; }
.vm-orders-modern .o-card:hover .o-card-cta svg { transform: translateX(3px); }

/* ---- Status badge ---- */
.vm-orders-modern .o-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    background: var(--_b, var(--o-bg-soft-2));
    color: var(--_c, var(--o-text));
    border: 1px solid transparent;
}
.vm-orders-modern .o-badge::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.vm-orders-modern .o-badge.is-wait   { --_b: #fef3c7; --_c: #92400e; }
.vm-orders-modern .o-badge.is-paid   { --_b: #d1fae5; --_c: #065f46; }
.vm-orders-modern .o-badge.is-prep   { --_b: #dbeafe; --_c: #1e40af; }
.vm-orders-modern .o-badge.is-ready  { --_b: #ede9fe; --_c: #5b21b6; }
.vm-orders-modern .o-badge.is-ship   { --_b: #e0e7ff; --_c: #3730a3; }
.vm-orders-modern .o-badge.is-done   { --_b: #e0f2fe; --_c: #075985; }
.vm-orders-modern .o-badge.is-cancel { --_b: #fee2e2; --_c: #991b1b; }

/* ============================================================
   Order details
   ============================================================ */

.vm-orders-modern .o-section { margin-top: 1.75rem; }
.vm-orders-modern .o-section-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.005em;
    margin: 0 0 .9rem;
    display: flex;
    align-items: center;
    gap: .55rem;
}
.vm-orders-modern .o-section-title svg { width: 18px; height: 18px; color: var(--o-text-muted); }

/* ---- Tracker timeline ---- */
.vm-orders-modern .o-tracker {
    background: linear-gradient(180deg, var(--o-bg) 0%, var(--o-bg-soft) 100%);
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius);
    padding: 1.5rem 1.25rem 1.25rem;
    box-shadow: var(--o-shadow-sm);
}
.vm-orders-modern .o-tracker-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.vm-orders-modern .o-tracker-head .o-state-summary {
    font-size: 1.05rem;
    font-weight: 600;
}

.vm-orders-modern .o-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    gap: 0;
}
.vm-orders-modern .o-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 .5rem;
}
.vm-orders-modern .o-step-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--o-bg);
    border: 2px solid var(--o-border);
    color: var(--o-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all .25s ease;
}
.vm-orders-modern .o-step-icon svg { width: 20px; height: 20px; }
.vm-orders-modern .o-step-label {
    margin-top: .65rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--o-text-muted);
    line-height: 1.3;
}
.vm-orders-modern .o-step-label small { display: block; font-size: .72rem; margin-top: .15rem; }
.vm-orders-modern .o-step-label small a { color: var(--o-accent); text-decoration: none; }
.vm-orders-modern .o-step-label small a:hover { text-decoration: underline; }

/* connector line */
.vm-orders-modern .o-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 23px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--o-border);
    z-index: 1;
}

/* states */
.vm-orders-modern .o-step.is-done .o-step-icon {
    background: var(--o-st-paid);
    border-color: var(--o-st-paid);
    color: #fff;
}
.vm-orders-modern .o-step.is-done .o-step-label { color: var(--o-text); }
.vm-orders-modern .o-step.is-done:not(:last-child)::after { background: var(--o-st-paid); }
.vm-orders-modern .o-step.is-active .o-step-icon {
    background: var(--o-primary);
    border-color: var(--o-primary);
    color: var(--o-primary-contrast);
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(17, 24, 39, .08);
}
.vm-orders-modern .o-step.is-active .o-step-label {
    color: var(--o-text);
    font-weight: 600;
}

/* cancel / delivered special states */
.vm-orders-modern .o-state-banner {
    margin: 0 0 1rem;
    padding: 1rem 1.15rem;
    border-radius: var(--o-radius-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .65rem;
}
.vm-orders-modern .o-state-banner.is-done { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.vm-orders-modern .o-state-banner.is-cancel { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.vm-orders-modern .o-state-banner svg { width: 22px; height: 22px; }

/* mobile: vertical timeline */
@media (max-width: 575.98px) {
    .vm-orders-modern .o-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .vm-orders-modern .o-step { flex-direction: row; align-items: center; gap: .9rem; text-align: left; padding: 0; }
    .vm-orders-modern .o-step-label { margin-top: 0; }
    .vm-orders-modern .o-step:not(:last-child)::after {
        top: 46px; left: 23px; width: 2px; height: calc(100% + 1rem);
    }
}

/* ---- Info cards grid ---- */
.vm-orders-modern .o-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .vm-orders-modern .o-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

.vm-orders-modern .o-info-card {
    background: var(--o-bg);
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--o-shadow-sm);
}
.vm-orders-modern .o-info-card h3 {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--o-text-muted);
    margin: 0 0 .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.vm-orders-modern .o-info-card h3 svg { width: 16px; height: 16px; }
.vm-orders-modern .o-info-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px dashed var(--o-border);
    font-size: .92rem;
}
.vm-orders-modern .o-info-line:last-child { border-bottom: 0; }
.vm-orders-modern .o-info-line .k {
    color: var(--o-text-muted);
    flex-shrink: 0;
    max-width: 50%;
}
.vm-orders-modern .o-info-line .v {
    text-align: right;
    font-weight: 500;
    word-break: break-word;
}
.vm-orders-modern .o-info-line .v.is-mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 1rem;
    letter-spacing: .02em;
}
.vm-orders-modern .o-copy-btn {
    background: var(--o-bg-soft);
    border: 1px solid var(--o-border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: .72rem;
    cursor: pointer;
    margin-left: .4rem;
    color: var(--o-text-muted);
    transition: all .15s ease;
}
.vm-orders-modern .o-copy-btn:hover { background: var(--o-text); color: #fff; border-color: var(--o-text); }
.vm-orders-modern .o-copy-btn.is-ok { background: var(--o-st-paid); color: #fff; border-color: var(--o-st-paid); }

/* ---- Tabs ---- */
.vm-orders-modern .o-tabs {
    display: flex;
    gap: .35rem;
    background: var(--o-bg-soft);
    padding: .35rem;
    border-radius: 999px;
    margin: 0 0 1.25rem;
    width: fit-content;
}
.vm-orders-modern .o-tabs .nav-link {
    background: transparent;
    border: 0;
    color: var(--o-text-muted);
    font-weight: 600;
    font-size: .9rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    transition: all .15s ease;
}
.vm-orders-modern .o-tabs .nav-link:hover { color: var(--o-text); }
.vm-orders-modern .o-tabs .nav-link.active {
    background: var(--o-bg);
    color: var(--o-text);
    box-shadow: var(--o-shadow-sm);
}

/* ---- Items list ---- */
.vm-orders-modern .o-items {
    background: var(--o-bg);
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius);
    overflow: hidden;
    box-shadow: var(--o-shadow-sm);
}
.vm-orders-modern .o-item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--o-border);
    align-items: center;
}
.vm-orders-modern .o-item:last-child { border-bottom: 0; }
.vm-orders-modern .o-item-img {
    width: 96px; height: 96px;
    border-radius: var(--o-radius-sm);
    background: var(--o-bg-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vm-orders-modern .o-item-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vm-orders-modern .o-item-info .o-item-name {
    font-weight: 600;
    color: var(--o-text);
    text-decoration: none;
    display: block;
    line-height: 1.3;
    margin-bottom: .25rem;
}
.vm-orders-modern .o-item-info .o-item-name:hover { color: var(--o-accent); }
.vm-orders-modern .o-item-info .o-item-meta {
    font-size: .82rem;
    color: var(--o-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
}
.vm-orders-modern .o-item-info .o-item-meta .qty-pill {
    background: var(--o-bg-soft);
    border-radius: 999px;
    padding: .15rem .55rem;
    font-weight: 600;
    color: var(--o-text);
}
.vm-orders-modern .o-item-price {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}
.vm-orders-modern .o-item-price .was {
    display: block;
    font-weight: 400;
    text-decoration: line-through;
    color: var(--o-text-soft);
    font-size: .8rem;
}

@media (max-width: 575.98px) {
    .vm-orders-modern .o-item {
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
    }
    .vm-orders-modern .o-item-img { width: 72px; height: 72px; }
    .vm-orders-modern .o-item-price {
        grid-column: 1 / -1;
        text-align: left;
        border-top: 1px dashed var(--o-border);
        padding-top: .55rem;
    }
}

/* ---- Order totals summary ---- */
.vm-orders-modern .o-totals {
    background: var(--o-bg);
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius);
    padding: 1.25rem;
    box-shadow: var(--o-shadow-sm);
    margin-top: 1rem;
}
.vm-orders-modern .o-totals-row {
    display: flex;
    justify-content: space-between;
    padding: .45rem 0;
    font-size: .92rem;
    color: var(--o-text);
}
.vm-orders-modern .o-totals-row .k { color: var(--o-text-muted); }
.vm-orders-modern .o-totals-row.is-grand {
    margin-top: .5rem;
    padding-top: .9rem;
    border-top: 1px solid var(--o-border);
    font-size: 1.2rem;
    font-weight: 700;
}
.vm-orders-modern .o-totals-row.is-grand .k { color: var(--o-text); }

/* ---- History timeline ---- */
.vm-orders-modern .o-history {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.vm-orders-modern .o-history::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--o-border);
}
.vm-orders-modern .o-history li {
    position: relative;
    padding: 0 0 1.1rem 2rem;
}
.vm-orders-modern .o-history li::before {
    content: "";
    position: absolute;
    left: 4px; top: 6px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--o-bg);
    border: 3px solid var(--o-accent);
}
.vm-orders-modern .o-history li:first-child::before {
    background: var(--o-accent);
}
.vm-orders-modern .o-history li .o-hist-meta {
    font-size: .78rem;
    color: var(--o-text-muted);
    margin-bottom: .15rem;
}
.vm-orders-modern .o-history li .o-hist-status {
    font-weight: 600;
    margin-bottom: .15rem;
}
.vm-orders-modern .o-history li .o-hist-comment {
    color: var(--o-text-muted);
    font-size: .9rem;
}
.vm-orders-modern .o-history-empty {
    text-align: center;
    color: var(--o-text-muted);
    padding: 1.5rem;
}

/* Make sure tab-pane content has air */
.vm-orders-modern .tab-content > .tab-pane { padding-top: .25rem; }


/* ============================================================
   Pagamento / Entrega — extras (orderdone parity)
   ============================================================ */
.vm-orders-modern .o-pay-logo {
    margin: 0 0 .85rem;
    text-align: left;
}
.vm-orders-modern .o-pay-logo img {
    display: inline-block;
    height: auto;
    max-width: 150px;
}
.vm-orders-modern .o-pay-alert {
    margin: .85rem 0 0;
    padding: .65rem .8rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: .85rem;
    line-height: 1.45;
}
.vm-orders-modern .o-pickup {
    line-height: 1.55;
    font-size: .92rem;
    color: var(--o-text);
}
.vm-orders-modern .o-pickup strong {
    display: block;
    font-size: 1rem;
    margin-bottom: .35rem;
    color: var(--o-text);
}
.vm-orders-modern .o-pickup-block {
    margin-top: .55rem;
    color: var(--o-text-muted);
}
.vm-orders-modern .o-pickup-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--o-text-soft);
    margin-bottom: .15rem;
}
.vm-orders-modern .o-info-line .v small {
    color: var(--o-text-muted);
    font-size: .8rem;
}