/* ============================================================
   Snelle TMS — design system (CSS puro, sem frameworks)
   Identidade: roxo #6d5ce8 · Inter · layout NexLink (rail + submenu)
   ============================================================ */

:root {
    /* Cor primária e derivados */
    --primary: #6d5ce8;
    --primary-hover: #5a49d6;
    --primary-deep: #211b3f;      /* rail */
    --primary-deep-hover: #2e2757;
    --primary-soft: #f1effd;      /* estados ativos/selecionados */
    --primary-line: #ddd8f8;

    /* Neutros */
    --bg: #f6f6fa;
    --surface: #ffffff;
    --border: #e9e8f1;
    --text: #1f2430;
    --muted: #6f6e7e;
    --faint: #a5a4b4;

    /* Status */
    --success: #0f8a52;
    --success-soft: #e4f6ec;
    --warning: #a16207;
    --warning-soft: #fbf1dc;
    --danger: #d12941;
    --danger-soft: #fdebee;
    --info: #2f6bde;
    --info-soft: #e9f0fd;

    /* Métricas de layout */
    --topnav-h: 64px;
    --radius: 12px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(31, 36, 48, .04), 0 8px 24px rgba(31, 36, 48, .05);
    --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.icon { flex-shrink: 0; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   Marca (imagens oficiais em public/images)
   ============================================================ */
.brand-icon { height: 26px; width: auto; display: block; }
.brand-logo { width: 140px; height: auto; display: block; }
.login-logo { width: 190px; height: auto; display: block; margin: 0 auto; }

/* ============================================================
   Topnav: logo + menus principais (dropdown ao clicar) + perfil
   ============================================================ */
.topnav {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 40;
}

.topnav-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 28px;
    height: var(--topnav-h);
}

.topnav-logo { display: flex; align-items: center; flex-shrink: 0; }
.topnav-logo img { width: 126px; height: auto; display: block; }

.topnav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.topnav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.topnav-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }

.topnav-link.active { color: var(--primary); background: var(--primary-soft); }

/* Indicador da seção ativa: barra na base da topnav */
.topnav-link.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -14px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--primary);
}

/* ---------- Dropdown de seção (abre ao clicar) ---------- */
.nav-dd { position: relative; }

.nav-dd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 13px);
    left: 0;
    min-width: 224px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 8px rgba(31, 36, 48, .05), 0 18px 44px rgba(31, 36, 48, .13);
    padding: 6px;
    z-index: 60;
}

.nav-dd.open .nav-dd-menu { display: block; }
.nav-dd.open > .nav-dd-btn { background: var(--bg); color: var(--text); }
.nav-dd.open > .nav-dd-btn.active { background: var(--primary-soft); color: var(--primary); }

.nav-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    transition: background .15s ease, color .15s ease;
}

.nav-dd-item:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-dd-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- Hambúrguer (mobile) ---------- */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.nav-toggle:hover { color: var(--primary); border-color: var(--primary-line); }

/* ---------- Breadcrumb abaixo da topnav ---------- */
.breadcrumb-bar { padding: 16px 32px 0; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--faint);
    white-space: nowrap;
    overflow: hidden;
}

.breadcrumb .crumb-sep { color: var(--border); }
.breadcrumb .crumb-current { color: var(--text); font-weight: 600; }

/* ---------- Perfil ---------- */
.profile { position: relative; }

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    color: var(--muted);
}

.profile-btn:hover { background: var(--bg); }

.profile-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.profile-meta strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.profile-meta small { font-size: 11.5px; color: var(--faint); }

.profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 6px;
    z-index: 50;
}

.profile-menu.open { display: block; }

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 11px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.profile-menu-item:hover { background: var(--danger-soft); color: var(--danger); }

.profile-menu-link { text-decoration: none; }
.profile-menu-link:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }

/* ---------- Avatar de iniciais ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8d7ff0);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    flex-shrink: 0;
}

.avatar-lg { width: 42px; height: 42px; font-size: 15px; }

/* Avatar com foto (usuário) ou logo (transportadora) */
.avatar-img { background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Meu Perfil ---------- */
.profile-photo-row { display: flex; align-items: flex-start; gap: 18px; }
.profile-photo-row .avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Controle segmentado (radio estilizado) ---------- */
.segmented {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 3px;
    gap: 3px;
}

.segmented-option { cursor: pointer; }

.segmented-option input { position: absolute; opacity: 0; pointer-events: none; }

.segmented-option span {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
}

.segmented-option input:checked + span {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

/* Título de seção dentro de formulários */
.form-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin: 18px 0 12px;
}

/* Célula de identidade nas tabelas (avatar + nome) */
.cell-id { display: flex; align-items: center; gap: 11px; }
.cell-id .cell-name { font-weight: 600; color: var(--text); }
.cell-id .cell-sub { font-size: 12.5px; color: var(--faint); }

/* ---------- Conteúdo (fluido: usa toda a largura disponível) ---------- */
.content { padding: 20px 32px 44px; width: 100%; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 21px;
    margin: 0;
    font-weight: 700;
    letter-spacing: -.02em;
}

.page-header p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }

/* ============================================================
   Botões
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
    background: transparent;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 92, 232, .28);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--primary-line); }

.btn-danger { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger-soft); }

.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { display: flex; width: 100%; }

/* Botões de ação com ícone (datagrid) */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--faint);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    vertical-align: middle;
}

.icon-btn:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.icon-btn.icon-btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.icon-btn-success:hover { background: var(--success-soft); color: var(--success); }

/* ============================================================
   Formulários
   ============================================================ */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 9px 13px;
    font-size: 13.5px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control::placeholder { color: var(--faint); }

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 92, 232, .14);
}

.form-hint { font-size: 12px; color: var(--faint); margin-top: 4px; }

.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.checkbox-list { display: flex; flex-direction: column; gap: 8px; }

.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }

.checkbox-item input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; }
.checkbox-item label { font-weight: 400; margin: 0; }

/* ---------- Barras de busca / filtros / bipagem ---------- */
.search-bar, .filter-bar, .scan-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar input { max-width: 330px; }
.filter-bar .form-control { width: auto; min-width: 155px; }

.scan-bar { flex-wrap: nowrap; }

.scan-input {
    font-size: 16px;
    padding: 12px 15px;
    font-family: var(--mono);
    letter-spacing: .04em;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 22px;
}

.card-title { margin: 0 0 16px; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- Cards de métricas ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.stat-card .stat-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.stat-card.accent .stat-value { color: var(--primary); }

.stat-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

/* ============================================================
   Datagrid
   ============================================================ */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    font-weight: 700;
    padding: 10px 14px;
    background: #fafafd;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }

.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover td { background: #f8f8fc; }

.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }

/* ---------- Estado vazio ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: var(--faint);
    padding: 42px 16px;
    font-size: 13.5px;
}

.empty-state .icon { color: var(--primary-line); }
.empty-state p { margin: 0; }

/* ============================================================
   Badges (pills)
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: #efeef5; color: var(--muted); }
.badge-accent, .badge-purple { background: var(--primary-soft); color: var(--primary); }

/* ============================================================
   Flash messages
   ============================================================ */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    font-weight: 500;
}

.flash-success { background: var(--success-soft); color: var(--success); border-color: #c4ebd5; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #f8cdd4; }

/* ============================================================
   Paginação
   ============================================================ */
.pagination-wrap { margin-top: 16px; }

.pagination { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; }

.page-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
    font-weight: 500;
    transition: border-color .15s ease, background .15s ease;
}

.page-link:hover { background: var(--primary-soft); border-color: var(--primary-line); text-decoration: none; }

.page-link.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.page-link.disabled { color: var(--faint); pointer-events: none; background: transparent; }

/* ============================================================
   Login (guest)
   ============================================================ */
body.guest { background: var(--bg); }

.guest-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

/* Elementos decorativos sutis em roxo */
.guest-shell::before,
.guest-shell::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.guest-shell::before {
    width: 480px;
    height: 480px;
    top: -180px;
    right: -120px;
    background: radial-gradient(circle, rgba(109, 92, 232, .18), transparent 65%);
}

.guest-shell::after {
    width: 420px;
    height: 420px;
    bottom: -160px;
    left: -110px;
    background: radial-gradient(circle, rgba(109, 92, 232, .13), transparent 65%);
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(31, 36, 48, .04), 0 18px 48px rgba(31, 36, 48, .09);
    border: 1px solid var(--border);
    padding: 36px 34px;
    z-index: 1;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.login-card h1 {
    margin: 0 0 5px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
    text-align: center;
}

.login-card .subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
}

/* ============================================================
   Responsivo: hambúrguer + painel/acordeão dos menus
   ============================================================ */
.nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(31, 36, 48, .4);
    z-index: 35;
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .topnav-inner { gap: 12px; padding: 0 16px; }
    .topnav-logo img { width: 110px; }

    .topnav-menu {
        display: none;
        position: fixed;
        top: var(--topnav-h);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--topnav-h));
        overflow-y: auto;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 24px 44px rgba(31, 36, 48, .16);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px 14px 18px;
        z-index: 45;
    }

    html.nav-open .topnav-menu { display: flex; }
    html.nav-open .nav-scrim { display: block; }

    /* Acordeão: submenus abertos dentro do painel */
    .nav-dd { position: static; }

    .nav-dd-menu {
        display: block;
        position: static;
        min-width: 0;
        border: none;
        box-shadow: none;
        padding: 0 0 8px 12px;
    }

    .topnav-link { width: 100%; justify-content: flex-start; }
    .nav-dd-btn { width: 100%; justify-content: space-between; }
    .topnav-link.active::after { display: none; }

    .profile-meta { display: none; }
    .content { padding: 16px 16px 32px; }
    .breadcrumb-bar { padding: 14px 16px 0; }
}

/* ============================================================
   Drawer lateral (histórico de status do pedido)
   ============================================================ */
.drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(31, 36, 48, .42);
    z-index: 70;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 410px;
    max-width: 94vw;
    background: var(--surface);
    box-shadow: -14px 0 44px rgba(31, 36, 48, .2);
    z-index: 71;
    transform: translateX(100%);
    transition: transform .22s ease;
    display: flex;
    flex-direction: column;
}

html.drawer-open .drawer { transform: translateX(0); }
html.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.drawer-head h2 { margin: 0; font-size: 15px; font-weight: 700; }

.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }

.history-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.history-tracking { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: .04em; }

/* ---------- Timeline vertical ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline-item { position: relative; padding: 0 0 22px 28px; }

.timeline-item::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 2px;
    width: 2px;
    background: var(--border);
}

.timeline-item:last-child { padding-bottom: 2px; }
.timeline-item:last-child::before { display: none; }

.timeline-dot {
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border);
    background: var(--faint);
}

.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-info { background: var(--info); }
.dot-danger { background: var(--danger); }
.dot-neutral { background: var(--faint); }

.timeline-meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.timeline-note {
    font-size: 12.5px;
    color: var(--text);
    margin-top: 6px;
    background: var(--bg);
    border-radius: 7px;
    padding: 6px 10px;
}

/* ============================================================
   Chip de canal (ícone + conta em uma coluna)
   ============================================================ */
.cell-channel { display: inline-flex; align-items: center; gap: 9px; }

.channel-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 10.5px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.channel-ico .icon { width: 14px; height: 14px; }
.channel-ico img { width: 22px; height: 22px; object-fit: contain; display: block; }
.channel-avulso img { width: 20px; height: 20px; }

.channel-ml { background: #fff4a8; color: #2d3277; }
.channel-shopee { background: #fff0eb; color: #ee4d2d; }
.channel-avulso { background: var(--primary-soft); color: var(--primary); }

.channel-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-channel .channel-account { color: var(--muted); font-size: 12px; font-weight: 500; }

/* ============================================================
   Recebimento: card do último bipe
   ============================================================ */
.scan-result {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scan-result.success { background: var(--success-soft); border-color: #bfe8d0; }
.scan-result.error { background: var(--danger-soft); border-color: #f6c6cf; }

.scan-result .scan-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--success);
}

.scan-result.error .scan-title { color: var(--danger); }

.scan-result .scan-tracking {
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .06em;
}

.scan-result .scan-amount { font-size: 26px; font-weight: 800; color: var(--success); }

.scan-meta {
    display: flex;
    gap: 8px 20px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: 13.5px;
}

.scan-idle { color: var(--faint); }
