/* ============================================================
 *  ZAPTOU — PAINEL DO LOJISTA v1.0
 *  Layout do painel administrativo do merchant
 *  Estilo iFood — clean, moderno, organizado
 * ============================================================
 *  Depende de: design-system.css (tokens CSS)
 * ============================================================ */

/* ── LAYOUT GRID ─────────────────────────────────────────────── */
.lojista-layout {
    display: flex;
    min-height: 100vh;
    background: var(--z-bg, #f8f9fa);
}

/* ── TOP HEADER ──────────────────────────────────────────────── */
.lojista-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 260px;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--z-surface, #ffffff);
    border-bottom: 1px solid var(--z-border, rgba(0,0,0,0.08));
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: left 0.25s ease, background 0.2s;
}

/* Sidebar collapsed: show icons only */
.lojista-sidebar.is-collapsed {
    width: 72px;
}

.lojista-sidebar.is-collapsed .lojista-sidebar-brand-text,
.lojista-sidebar.is-collapsed .lojista-sidebar-brand-sub,
.lojista-sidebar.is-collapsed .lojista-nav-group-title,
.lojista-sidebar.is-collapsed .lojista-nav-item-label,
.lojista-sidebar.is-collapsed .lojista-nav-badge,
.lojista-sidebar.is-collapsed .lojista-sidebar-footer .lojista-nav-item-label {
    display: none;
}

.lojista-sidebar.is-collapsed .lojista-sidebar-brand {
    justify-content: center;
    padding: 16px 8px 14px;
}

.lojista-sidebar.is-collapsed .lojista-nav-item {
    justify-content: center;
    padding: 10px;
    position: relative;
}

.lojista-sidebar.is-collapsed .lojista-nav-item--active {
    background: var(--z-primary-light, rgba(255,92,0,0.08));
}

.lojista-sidebar.is-collapsed .lojista-nav-item--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--z-primary, #ff5c00);
    border-radius: 0 3px 3px 0;
}

.lojista-sidebar.is-collapsed .lojista-nav-group {
    border-bottom: none;
    padding: 2px 0;
}

.lojista-sidebar.is-collapsed .lojista-nav-group + .lojista-nav-group {
    border-top: 1px solid var(--z-border, rgba(0,0,0,0.06));
    margin-top: 2px;
    padding-top: 4px;
}

.lojista-sidebar.is-collapsed .lojista-sidebar-footer .lojista-nav-item {
    justify-content: center;
}

/* Keep the expand control available in the topbar on desktop. */
@media (min-width: 992px) {
    .lojista-sidebar.is-collapsed + .lojista-main .lojista-sidebar-toggle--desktop,
    .lojista-sidebar.is-collapsed ~ .lojista-main .lojista-sidebar-toggle--desktop {
        display: inline-flex !important;
    }
}

.lojista-sidebar.is-collapsed + .lojista-main,
.lojista-sidebar.is-collapsed ~ .lojista-main {
    margin-left: 72px;
}

.lojista-sidebar.is-collapsed + .lojista-main .lojista-topbar,
.lojista-sidebar.is-collapsed ~ .lojista-main .lojista-topbar {
    left: 72px;
}

.lojista-sidebar-toggle--desktop {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--z-primary, #ff5c00);
    color: #fff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lojista-sidebar-toggle--desktop:hover {
    background: var(--z-primary-dark, #e54f00);
    transform: scale(1.05);
}

.lojista-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lojista-topbar-store {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--z-text, #271812);
}

.lojista-topbar-store-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

.lojista-topbar-store-status--open {
    background: rgba(0, 204, 102, 0.12);
    color: #059669;
    border: 1px solid rgba(0, 204, 102, 0.25);
}

.lojista-topbar-store-status--closed {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.lojista-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lojista-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
    border-radius: var(--z-radius-sm, 8px);
    background: transparent;
    color: var(--z-text-secondary, #5b4137);
    font-family: var(--z-font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--z-transition, 0.2s);
}

.lojista-topbar-btn:hover {
    background: var(--z-surface-hover, #f1f3f5);
    color: var(--z-primary, #a73a00);
    border-color: var(--z-primary, #a73a00);
}

.lojista-topbar-btn--primary {
    background: linear-gradient(135deg, var(--z-primary, #a73a00), var(--z-primary-light, #ff5c00));
    color: #fff;
    border-color: transparent;
}

.lojista-topbar-btn--primary:hover {
    opacity: 0.9;
    color: #fff;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.lojista-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 101;
    display: flex;
    flex-direction: column;
    background: var(--z-surface, #ffffff);
    border-right: 1px solid var(--z-border, rgba(0,0,0,0.08));
    box-shadow: 1px 0 4px rgba(0,0,0,0.04);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s ease, transform 0.3s ease;
}

/* Sidebar brand/logo */
.lojista-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--z-border, rgba(0,0,0,0.08));
    flex-shrink: 0;
}

.lojista-sidebar-brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--z-primary, #a73a00), var(--z-primary-light, #ff5c00));
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lojista-sidebar-brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--z-primary, #a73a00);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.lojista-sidebar-brand-sub {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--z-text-muted, #8f7065);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
}

/* Sidebar navigation */
.lojista-sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

/* Navigation group */
.lojista-nav-group {
    margin-bottom: 4px;
}

.lojista-nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--z-text-muted, #8f7065);
    cursor: pointer;
    user-select: none;
    transition: color var(--z-transition, 0.2s);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--z-font);
}

.lojista-nav-group-title:hover {
    color: var(--z-text-secondary, #5b4137);
}

.lojista-nav-group-title .material-symbols-outlined {
    font-size: 16px;
    transition: transform var(--z-transition, 0.2s);
}

.lojista-nav-group.is-collapsed .lojista-nav-group-title .material-symbols-outlined {
    transform: rotate(-90deg);
}

.lojista-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.lojista-nav-group.is-collapsed .lojista-nav-group-items {
    display: none;
}

/* When sidebar is collapsed, force ALL nav items visible (icons only) */
.lojista-sidebar.is-collapsed .lojista-nav-group.is-collapsed .lojista-nav-group-items,
.lojista-sidebar.is-collapsed .lojista-nav-group .lojista-nav-group-items {
    display: flex !important;
}

.lojista-sidebar.is-collapsed .lojista-nav-group-title {
    display: none !important;
}

.lojista-sidebar.is-collapsed .lojista-nav-group {
    border-bottom: none;
    padding: 0;
    margin: 0;
}

/* Navigation item */
.lojista-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--z-radius-sm, 8px);
    color: var(--z-text-secondary, #5b4137);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--z-transition, 0.2s);
    cursor: pointer;
    position: relative;
}

.lojista-nav-item .material-symbols-outlined {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: var(--z-text-muted, #8f7065);
    transition: color var(--z-transition, 0.2s);
}

.lojista-nav-item:hover {
    background: var(--z-surface-hover, #f1f3f5);
    color: var(--z-text, #271812);
}

.lojista-nav-item:hover .material-symbols-outlined {
    color: var(--z-primary, #a73a00);
}

.lojista-nav-item--active {
    background: rgba(228, 74, 0, 0.08);
    color: var(--z-primary, #E44A00);
    font-weight: 600;
}

.lojista-nav-item--active .material-symbols-outlined {
    color: var(--z-primary, #E44A00);
}

.lojista-nav-item--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    background: var(--z-primary, #E44A00);
    border-radius: 0 3px 3px 0;
}

/* Nav badge (count) */
.lojista-nav-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--z-primary, #a73a00);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
}

.lojista-nav-badge--neutral {
    background: var(--z-surface-2, #f8f9fa);
    color: var(--z-text-secondary, #5b4137);
}

/* Sidebar footer */
.lojista-sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--z-border, rgba(0,0,0,0.08));
    flex-shrink: 0;
}

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.lojista-main {
    flex: 1;
    margin-left: 260px;
    padding-top: 60px;
    transition: margin-left 0.25s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lojista-content {
    flex: 1;
    padding: 20px 24px;
    max-width: 100%;
    width: 100%;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.lojista-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--z-border, rgba(0,0,0,0.08));
    background: var(--z-surface, #ffffff);
    font-size: 0.75rem;
    color: var(--z-text-muted, #8f7065);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.lojista-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lojista-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lojista-footer a {
    color: var(--z-text-muted, #8f7065);
    text-decoration: none;
    transition: color var(--z-transition, 0.2s);
}

.lojista-footer a:hover {
    color: var(--z-primary, #a73a00);
}

.lojista-footer-sep {
    color: var(--z-border-strong, rgba(0,0,0,0.14));
}

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.lojista-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.lojista-page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lojista-page-header-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--z-primary, #a73a00), var(--z-primary-light, #ff5c00));
    border-radius: 12px;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.lojista-page-header-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--z-text, #271812);
    letter-spacing: -0.3px;
    margin: 0;
}

.lojista-page-header-subtitle {
    font-size: 0.82rem;
    color: var(--z-text-secondary, #5b4137);
    margin-top: 2px;
}

.lojista-page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── STATS CARDS ─────────────────────────────────────────────── */
.lojista-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.lojista-stat-card {
    background: var(--z-surface, #ffffff);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
    border-radius: var(--z-radius-lg, 16px);
    padding: 20px;
    box-shadow: var(--z-shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    transition: transform var(--z-transition, 0.2s), box-shadow var(--z-transition, 0.2s);
}

.lojista-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--z-shadow-md, 0 8px 16px rgba(0,0,0,0.08));
}

.lojista-stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.lojista-stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.lojista-stat-card-icon--orange { background: rgba(167, 58, 0, 0.1); color: var(--z-primary, #a73a00); }
.lojista-stat-card-icon--green  { background: rgba(0, 167, 115, 0.1); color: var(--z-accent, #00a773); }
.lojista-stat-card-icon--blue   { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.lojista-stat-card-icon--purple { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.lojista-stat-card-icon--red    { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.lojista-stat-card-icon--yellow { background: rgba(245, 158, 11, 0.1); color: #d97706; }

.lojista-stat-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--z-text, #271812);
    line-height: 1.1;
}

.lojista-stat-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--z-text-secondary, #5b4137);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lojista-stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 8px;
}

.lojista-stat-card-trend--up {
    background: rgba(0, 204, 102, 0.1);
    color: #059669;
}

.lojista-stat-card-trend--down {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ── SECTION CARD ────────────────────────────────────────────── */
.lojista-card {
    background: var(--z-surface, #ffffff);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
    border-radius: var(--z-radius-lg, 16px);
    box-shadow: var(--z-shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    margin-bottom: 20px;
    overflow: hidden;
}

.lojista-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--z-border, rgba(0,0,0,0.08));
    flex-wrap: wrap;
}

.lojista-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lojista-card-header-icon {
    font-size: 1.2rem;
    color: var(--z-primary, #a73a00);
}

.lojista-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--z-text, #271812);
    margin: 0;
}

.lojista-card-subtitle {
    font-size: 0.78rem;
    color: var(--z-text-secondary, #5b4137);
    margin-top: 1px;
}

.lojista-card-actions {
    display: flex;
    gap: 8px;
}

.lojista-card-body {
    padding: 24px;
}

.lojista-card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--z-border, rgba(0,0,0,0.08));
    background: var(--z-surface-2, #f8f9fa);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.lojista-form-grid {
    display: grid;
    gap: 16px;
}

.lojista-form-grid--2 { grid-template-columns: 1fr 1fr; }
.lojista-form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.lojista-form-grid--4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.lojista-form-group {
    margin-bottom: 16px;
}

.lojista-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--z-text-secondary, #5b4137);
    margin-bottom: 6px;
}

.lojista-form-control {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-family: var(--z-font);
    font-size: 0.9rem;
    color: var(--z-text, #271812);
    background: var(--z-surface-2, #f8f9fa);
    border: 1px solid var(--z-border-strong, rgba(0,0,0,0.14));
    border-radius: var(--z-radius-sm, 8px);
    outline: none;
    transition: border-color var(--z-transition, 0.2s), box-shadow var(--z-transition, 0.2s);
}

.lojista-form-control:focus {
    border-color: var(--z-primary, #a73a00);
    box-shadow: 0 0 0 3px var(--z-primary-glow, rgba(167, 58, 0, 0.15));
    background: var(--z-surface, #ffffff);
}

.lojista-form-control::placeholder {
    color: var(--z-text-muted, #8f7065);
}

.lojista-form-control--textarea {
    height: auto;
    min-height: 80px;
    padding: 12px 14px;
    resize: vertical;
}

.lojista-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f7065' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px !important;
}

/* ── TABLE ───────────────────────────────────────────────────── */
.lojista-table-wrapper {
    overflow-x: auto;
    border-radius: var(--z-radius-sm, 8px);
}

.lojista-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.lojista-table th {
    background: var(--z-surface-2, #f8f9fa);
    color: var(--z-text-secondary, #5b4137);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--z-border, rgba(0,0,0,0.08));
    text-align: left;
    white-space: nowrap;
}

.lojista-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--z-border, rgba(0,0,0,0.08));
    font-size: 0.88rem;
    color: var(--z-text, #271812);
    vertical-align: middle;
}

.lojista-table tbody tr {
    transition: background-color var(--z-transition, 0.2s);
}

.lojista-table tbody tr:hover {
    background: var(--z-surface-hover, #f1f3f5);
}

.lojista-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── FILTER BAR ──────────────────────────────────────────────── */
.lojista-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

.lojista-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lojista-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--z-text-secondary, #5b4137);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lojista-filter-control {
    height: 36px;
    padding: 0 12px;
    font-family: var(--z-font);
    font-size: 0.85rem;
    color: var(--z-text, #271812);
    background: var(--z-surface, #ffffff);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
    border-radius: var(--z-radius-sm, 8px);
    outline: none;
    transition: border-color var(--z-transition, 0.2s);
}

.lojista-filter-control:focus {
    border-color: var(--z-primary, #a73a00);
}

/* ── ALERT / NOTIFICATION ────────────────────────────────────── */
.lojista-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--z-radius-md, 12px);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.lojista-alert--success {
    background: rgba(0, 204, 102, 0.08);
    color: #059669;
    border-color: rgba(0, 204, 102, 0.2);
}

.lojista-alert--warning {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.lojista-alert--danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.lojista-alert--info {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
}

.lojista-alert .material-symbols-outlined {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.lojista-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--z-radius-sm, 8px);
    font-family: var(--z-font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--z-transition, 0.2s);
    white-space: nowrap;
}

.lojista-btn:active {
    transform: scale(0.97);
}

.lojista-btn--primary {
    background: linear-gradient(135deg, var(--z-primary, #a73a00), var(--z-primary-light, #ff5c00));
    color: #fff;
    box-shadow: 0 4px 12px rgba(167, 58, 0, 0.2);
}

.lojista-btn--primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(167, 58, 0, 0.3);
}

.lojista-btn--secondary {
    background: var(--z-surface-2, #f8f9fa);
    color: var(--z-text-secondary, #5b4137);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
}

.lojista-btn--secondary:hover {
    background: var(--z-surface-hover, #f1f3f5);
    color: var(--z-primary, #a73a00);
    border-color: var(--z-primary, #a73a00);
}

.lojista-btn--success {
    background: linear-gradient(135deg, var(--z-accent, #00a773), #00e077);
    color: #fff;
}

.lojista-btn--success:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.lojista-btn--danger {
    background: linear-gradient(135deg, var(--z-danger, #ba1a1a), #f87171);
    color: #fff;
}

.lojista-btn--danger:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.lojista-btn--ghost {
    background: transparent;
    color: var(--z-text-secondary, #5b4137);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
}

.lojista-btn--ghost:hover {
    background: var(--z-surface-hover, #f1f3f5);
    color: var(--z-primary, #a73a00);
}

.lojista-btn--sm {
    height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
}

.lojista-btn--lg {
    height: 46px;
    padding: 0 24px;
    font-size: 0.95rem;
}

/* ── TOGGLE SWITCH ──────────────────────────────────────────── */
.lojista-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}
.lojista-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.lojista-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 13px;
    transition: 0.3s;
}
.lojista-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.lojista-toggle input:checked + .lojista-toggle-slider {
    background: var(--z-accent, #00a773);
}
.lojista-toggle input:checked + .lojista-toggle-slider::before {
    transform: translateX(22px);
}

/* ── METHOD CARD (Payment Methods) ──────────────────────────── */
.method-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--z-border);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all var(--z-transition, 0.2s);
}
.method-card:hover {
    border-color: var(--z-primary);
}
.method-card.active {
    border-color: var(--z-accent);
    background: rgba(0,167,115,0.03);
}
.method-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}
.method-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.method-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.method-desc {
    font-size: 0.8rem;
    color: var(--z-text-muted);
    margin-top: 2px;
}

/* ── CHECKBOX CUSTOM ───────────────────────────────────────── */
.lojista-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--z-primary, #a73a00);
    cursor: pointer;
}
.lojista-check-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--z-text, #271812);
    cursor: pointer;
}
.lojista-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* ── BADGES / PILLS DE STATUS ────────────────────────────────── */
.lojista-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.lojista-badge--info    { background: rgba(59,130,246,0.1); color: #2563eb; border-color: rgba(59,130,246,0.2); }
.lojista-badge--warning { background: rgba(245,158,11,0.1); color: #d97706; border-color: rgba(245,158,11,0.2); }
.lojista-badge--success { background: rgba(0,204,102,0.1); color: #059669; border-color: rgba(0,204,102,0.2); }
.lojista-badge--danger  { background: rgba(239,68,68,0.1); color: #dc2626; border-color: rgba(239,68,68,0.2); }
.lojista-badge--purple  { background: rgba(124,58,237,0.1); color: #7c3aed; border-color: rgba(124,58,237,0.2); }
.lojista-badge--done    { background: rgba(0,167,115,0.1); color: #006c49; border-color: rgba(0,167,115,0.2); }
.lojista-badge--neutral { background: var(--z-surface-2); color: var(--z-text-secondary); border: 1px solid var(--z-border); }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.lojista-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--z-text-secondary, #5b4137);
}

.lojista-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
    color: var(--z-text-muted, #8f7065);
}

.lojista-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--z-text, #271812);
    margin-bottom: 8px;
}

.lojista-empty-desc {
    font-size: 0.88rem;
    margin-bottom: 20px;
}

/* ── SKELETON LOADING ────────────────────────────────────────── */
@keyframes lojistaShimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.lojista-skeleton {
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.04) 25%, 
        rgba(0,0,0,0.08) 37%, 
        rgba(0,0,0,0.04) 63%
    );
    background-size: 800px 100%;
    animation: lojistaShimmer 1.6s ease-in-out infinite;
    border-radius: var(--z-radius-sm, 8px);
    pointer-events: none;
    user-select: none;
}

/* Skeleton variants */
.lojista-skeleton--text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}

.lojista-skeleton--text-sm {
    height: 10px;
    width: 60%;
    border-radius: 3px;
}

.lojista-skeleton--text-lg {
    height: 24px;
    width: 50%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.lojista-skeleton--circle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.lojista-skeleton--block {
    height: 80px;
    width: 100%;
}

.lojista-skeleton--chart {
    height: 220px;
    width: 100%;
    border-radius: var(--z-radius-sm, 8px);
}

.lojista-skeleton--card {
    height: 120px;
    width: 100%;
    border-radius: var(--z-radius-lg, 16px);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
}

.lojista-skeleton--badge {
    display: inline-block;
    width: 70px;
    height: 22px;
    border-radius: 999px;
    vertical-align: middle;
}

.lojista-skeleton--btn {
    display: inline-block;
    width: 90px;
    height: 36px;
    border-radius: var(--z-radius-sm, 8px);
}

/* Skeleton inside stat cards */
.lojista-skeleton-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.lojista-skeleton-stat-value {
    height: 28px;
    width: 120px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.lojista-skeleton-stat-label {
    height: 12px;
    width: 90px;
    border-radius: 4px;
}

/* Skeleton stat card placeholder (replaces entire stat card) */
.lojista-stat-card-skeleton {
    background: var(--z-surface, #ffffff);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
    border-radius: var(--z-radius-lg, 16px);
    padding: 20px;
    box-shadow: var(--z-shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lojista-stat-card-skeleton .lojista-skeleton-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Skeleton overlay for charts (positioned over canvas) */
.lojista-chart-skeleton {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: var(--z-surface, #ffffff);
    border-radius: inherit;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.lojista-chart-skeleton.is-loaded {
    opacity: 0;
    pointer-events: none;
}

.lojista-chart-skeleton-bar {
    width: 60%;
    height: 12px;
    border-radius: 6px;
}

.lojista-chart-skeleton-bar:nth-child(1) { width: 45%; }
.lojista-chart-skeleton-bar:nth-child(2) { width: 70%; }
.lojista-chart-skeleton-bar:nth-child(3) { width: 55%; }
.lojista-chart-skeleton-bar:nth-child(4) { width: 80%; }
.lojista-chart-skeleton-bar:nth-child(5) { width: 35%; }

/* Skeleton row for table */
.lojista-skeleton-tr {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    align-items: center;
}

.lojista-skeleton-tr .lojista-skeleton--text {
    flex: 1;
    margin-bottom: 0;
}

.lojista-skeleton-tr .lojista-skeleton--text:nth-child(1) { max-width: 40px; }
.lojista-skeleton-tr .lojista-skeleton--text:nth-child(2) { max-width: 80px; }
.lojista-skeleton-tr .lojista-skeleton--text:nth-child(3) { max-width: 120px; }
.lojista-skeleton-tr .lojista-skeleton--text:nth-child(4) { max-width: 60px; }
.lojista-skeleton-tr .lojista-skeleton--text:nth-child(5) { max-width: 100px; }

/* Skeleton wrapper to contain position for chart overlay */
.lojista-card-body-skeleton {
    position: relative;
}

/* Reduced motion: disable shimmer */
@media (prefers-reduced-motion: reduce) {
    .lojista-skeleton {
        animation: none;
        background: rgba(0,0,0,0.04);
    }
    .lojista-chart-skeleton {
        display: none;
    }
}

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────── */
.lojista-toast-container {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.lojista-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.lojista-toast.is-closing {
    animation: toastSlideOut 0.25s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
}

/* Toast progress bar (auto-dismiss timer) */
.lojista-toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0,0,0,0.12);
    animation: toastProgress var(--toast-duration, 4s) linear forwards;
    border-radius: 0 2px 0 0;
}

.lojista-toast.is-paused::after {
    animation-play-state: paused;
}

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

.lojista-toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.lojista-toast-content {
    flex: 1;
    min-width: 0;
}

.lojista-toast-message {
    color: inherit;
    font-weight: 500;
}

.lojista-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    font-size: 16px;
    padding: 0;
    margin: -2px -4px 0 0;
}

.lojista-toast-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.08);
}

/* Toast variants */
.lojista-toast--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid rgba(0, 204, 102, 0.25);
}

.lojista-toast--success .lojista-toast-icon {
    color: #059669;
}

.lojista-toast--success::after {
    background: #059669;
}

.lojista-toast--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.lojista-toast--error .lojista-toast-icon {
    color: #dc2626;
}

.lojista-toast--error::after {
    background: #dc2626;
}

.lojista-toast--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.lojista-toast--warning .lojista-toast-icon {
    color: #d97706;
}

.lojista-toast--warning::after {
    background: #d97706;
}

.lojista-toast--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.lojista-toast--info .lojista-toast-icon {
    color: #2563eb;
}

.lojista-toast--info::after {
    background: #2563eb;
}

/* Toast reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lojista-toast { animation: none; }
    .lojista-toast.is-closing { animation: none; opacity: 0; }
    .lojista-toast::after { animation: none; }
}

/* Toast responsive */
@media (max-width: 576px) {
    .lojista-toast-container {
        top: 60px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
 *  ANIMAÇÕES & MICRO-INTERAÇÕES
 *  Page transitions, hover effects, feedback visual
 * ═══════════════════════════════════════════════════════════════ */

/* ── PAGE TRANSITION (fade + slide-up) ───────────────────────── */
@keyframes lojistaFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lojista-content {
    animation: lojistaFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.lojista-page-header {
    animation: lojistaFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.05s;
}

.lojista-stats-grid {
    animation: lojistaFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.1s;
}

.lojista-card {
    animation: lojistaFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.lojista-card:nth-child(1) { animation-delay: 0.05s; }
.lojista-card:nth-child(2) { animation-delay: 0.1s; }
.lojista-card:nth-child(3) { animation-delay: 0.15s; }
.lojista-card:nth-child(4) { animation-delay: 0.2s; }
.lojista-card:nth-child(5) { animation-delay: 0.25s; }
.lojista-card:nth-child(6) { animation-delay: 0.3s; }

/* ── ENHANCED STAT CARD HOVER ─────────────────────────────────── */
.lojista-stat-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.lojista-stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(167, 58, 0, 0.03));
    opacity: 0;
    transition: opacity var(--z-transition, 0.2s);
    pointer-events: none;
}

.lojista-stat-card:hover::after {
    opacity: 1;
}

.lojista-stat-card:hover .lojista-stat-card-icon {
    transform: scale(1.12) rotate(-3deg);
}

.lojista-stat-card:hover .lojista-stat-card-value {
    color: var(--z-primary, #a73a00);
}

.lojista-stat-card-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.lojista-stat-card-value {
    transition: color 0.2s ease;
}

/* ── SECTION CARD HOVER ───────────────────────────────────────── */
.lojista-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.2s ease;
}

.lojista-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    border-color: rgba(167, 58, 0, 0.15);
}

.lojista-card-header-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.2s ease;
}

.lojista-card:hover .lojista-card-header-icon {
    transform: scale(1.15);
    color: var(--z-primary-light, #ff5c00);
}

.lojista-card-header {
    transition: background-color 0.2s ease;
}

.lojista-card:hover .lojista-card-header {
    background-color: rgba(167, 58, 0, 0.02);
}

/* ── TABLE ROW ENHANCED ───────────────────────────────────────── */
.lojista-table tbody tr {
    position: relative;
}

.lojista-table tbody tr td:first-child {
    position: relative;
    padding-left: 20px;
    transition: padding-left 0.2s ease;
}

.lojista-table tbody tr td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 20px;
    background: var(--z-primary, #a73a00);
    border-radius: 0 2px 2px 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lojista-table tbody tr:hover td:first-child {
    padding-left: 24px;
}

.lojista-table tbody tr:hover td:first-child::before {
    transform: translateY(-50%) scaleY(1);
}

/* ── SIDEBAR NAV ITEM ENHANCED ────────────────────────────────── */
.lojista-nav-item .material-symbols-outlined {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                color var(--z-transition, 0.2s);
}

.lojista-nav-item:hover .material-symbols-outlined {
    transform: translateX(3px);
}

.lojista-nav-item--active .material-symbols-outlined {
    transform: none;
}

.lojista-nav-item--active:hover .material-symbols-outlined {
    transform: none;
}

.lojista-nav-group-title .material-symbols-outlined {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── BADGE HOVER ──────────────────────────────────────────────── */
.lojista-badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.lojista-badge:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── BUTTON RIPPLE ────────────────────────────────────────────── */
.lojista-btn {
    position: relative;
    overflow: hidden;
}

.lojista-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lojista-btn:active::after {
    opacity: 1;
    transition: opacity 0s;
}

.lojista-btn--primary {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                opacity 0.2s ease;
}

.lojista-btn--primary:hover {
    transform: translateY(-1px) scale(1.02);
}

.lojista-btn--primary:active {
    transform: scale(0.96);
}

.lojista-btn--secondary {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease;
}

.lojista-btn--secondary:hover {
    transform: translateY(-1px);
}

.lojista-btn--secondary:active {
    transform: scale(0.97);
}

.lojista-btn--success:hover {
    transform: translateY(-1px) scale(1.02);
}

.lojista-btn--success:active {
    transform: scale(0.96);
}

.lojista-btn--danger:hover {
    transform: translateY(-1px) scale(1.02);
}

.lojista-btn--danger:active {
    transform: scale(0.96);
}

/* ── TOPBAR BTN ENHANCED ──────────────────────────────────────── */
.lojista-topbar-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease;
}

.lojista-topbar-btn:hover {
    transform: translateY(-1px);
}

.lojista-topbar-btn:active {
    transform: scale(0.95);
}

.lojista-topbar-btn--primary {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.2s ease;
}

.lojista-topbar-btn--primary:active {
    transform: scale(0.96);
}

/* ── TOGGLE ENHANCED ──────────────────────────────────────────── */
.lojista-toggle-slider {
    transition: background 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.lojista-toggle-slider::before {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.lojista-toggle input:checked + .lojista-toggle-slider::before {
    box-shadow: 0 2px 8px rgba(0, 167, 115, 0.3);
}

.lojista-toggle:hover .lojista-toggle-slider {
    background: #b0bec5;
}

.lojista-toggle input:checked:hover + .lojista-toggle-slider {
    background: var(--z-accent, #00a773);
    box-shadow: 0 0 0 4px rgba(0, 167, 115, 0.1);
}

/* ── METHOD CARD ENHANCED ─────────────────────────────────────── */
.method-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.2s ease,
                background 0.2s ease;
    cursor: default;
}

.method-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.method-card:active {
    transform: scale(0.99);
}

.method-card.active {
    transform: none;
    box-shadow: 0 0 0 2px rgba(0, 167, 115, 0.15);
}

/* ── FORM CONTROL ENHANCED ────────────────────────────────────── */
.lojista-form-control {
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease,
                transform 0.15s ease;
}

.lojista-form-control:focus {
    transform: scale(1.01);
}

.lojista-filter-control {
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.15s ease;
}

.lojista-filter-control:focus {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(167, 58, 0, 0.08);
}

.lojista-filter-control:hover {
    border-color: var(--z-text-muted, #8f7065);
}

/* ── CHECKBOX ENHANCED ────────────────────────────────────────── */
.lojista-check-input {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease;
}

.lojista-check-input:hover {
    transform: scale(1.15);
}

.lojista-check-input:active {
    transform: scale(0.9);
}

.lojista-check-label {
    transition: color 0.2s ease;
}

.lojista-form-check:hover .lojista-check-label {
    color: var(--z-primary, #a73a00);
}

/* ── EMPTY STATE HOVER ────────────────────────────────────────── */
.lojista-empty {
    transition: transform 0.3s ease;
}

.lojista-empty:hover {
    transform: scale(1.01);
}

.lojista-empty:hover .lojista-empty-icon {
    transform: scale(1.1) rotate(-3deg);
}

.lojista-empty-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── ALERT HOVER ──────────────────────────────────────────────── */
.lojista-alert {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lojista-alert:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* ── SIDEBAR FOOTER LINK HOVER ────────────────────────────────── */
.lojista-sidebar-footer .lojista-nav-item {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.2s ease,
                background 0.2s ease;
}

.lojista-sidebar-footer .lojista-nav-item:hover {
    transform: translateX(3px);
}

/* ── MOBILE TOGGLE HOVER ──────────────────────────────────────── */
.lojista-mobile-toggle {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease;
}

.lojista-mobile-toggle:hover {
    transform: scale(1.05);
}

.lojista-mobile-toggle:active {
    transform: scale(0.9);
}

/* ── STATS GRID STAGGER ───────────────────────────────────────── */
.lojista-stat-card {
    animation: lojistaFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.lojista-stats-grid .lojista-stat-card:nth-child(1) { animation-delay: 0.02s; }
.lojista-stats-grid .lojista-stat-card:nth-child(2) { animation-delay: 0.06s; }
.lojista-stats-grid .lojista-stat-card:nth-child(3) { animation-delay: 0.10s; }
.lojista-stats-grid .lojista-stat-card:nth-child(4) { animation-delay: 0.14s; }
.lojista-stats-grid .lojista-stat-card:nth-child(5) { animation-delay: 0.18s; }
.lojista-stats-grid .lojista-stat-card:nth-child(6) { animation-delay: 0.22s; }

/* ── MOBILE REDUCED MOTION ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lojista-content,
    .lojista-page-header,
    .lojista-stats-grid,
    .lojista-card,
    .lojista-stat-card {
        animation: none;
    }
    
    .lojista-stat-card::after,
    .lojista-table tbody tr::before,
    .lojista-btn::after {
        display: none;
    }
    
    .lojista-stat-card,
    .lojista-card,
    .lojista-btn,
    .lojista-topbar-btn,
    .lojista-stat-card-icon,
    .lojista-nav-item .material-symbols-outlined,
    .lojista-badge,
    .method-card,
    .lojista-form-control,
    .lojista-empty-icon {
        transition: none !important;
        transform: none !important;
    }
    
    .lojista-stat-card:hover,
    .lojista-card:hover,
    .lojista-btn:hover {
        transform: none !important;
    }
}

/* ── MOBILE TOGGLE ───────────────────────────────────────────── */
.lojista-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--z-text, #271812);
    cursor: pointer;
    border-radius: var(--z-radius-sm, 8px);
    font-size: 1.3rem;
}

.lojista-mobile-toggle:hover {
    background: var(--z-surface-hover, #f1f3f5);
}

/* Sidebar overlay for mobile */
.lojista-sidebar-overlay {
    visibility: hidden;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lojista-sidebar-overlay.is-visible {
    visibility: visible;
    opacity: 1;
}

/* ── TABLE ROW STAGGERED ENTRY ───────────────────────────────── */
.lojista-table tbody tr {
    animation: lojistaRowIn 0.35s ease backwards;
}

.lojista-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.lojista-table tbody tr:nth-child(2) { animation-delay: 0.05s; }
.lojista-table tbody tr:nth-child(3) { animation-delay: 0.08s; }
.lojista-table tbody tr:nth-child(4) { animation-delay: 0.11s; }
.lojista-table tbody tr:nth-child(5) { animation-delay: 0.14s; }
.lojista-table tbody tr:nth-child(6) { animation-delay: 0.17s; }
.lojista-table tbody tr:nth-child(7) { animation-delay: 0.20s; }
.lojista-table tbody tr:nth-child(8) { animation-delay: 0.23s; }
.lojista-table tbody tr:nth-child(9) { animation-delay: 0.26s; }
.lojista-table tbody tr:nth-child(10) { animation-delay: 0.29s; }

@keyframes lojistaRowIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Table skeleton overlay */
.lojista-table-skeleton {
    overflow: hidden;
}

.lojista-table-skeleton tbody {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lojista-table-skeleton.is-loaded tbody {
    opacity: 1;
}

.lojista-table-skeleton-rows {
    transition: opacity 0.35s ease;
}

.lojista-table-skeleton.is-loaded .lojista-table-skeleton-rows {
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .lojista-table tbody tr {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
 *  CONFIRMATION MODAL
 *  Beautiful modal to replace native confirm() for destructive actions
 * ═══════════════════════════════════════════════════════════════ */

/* Overlay */
.lojista-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lojista-confirm-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Modal card */
.lojista-confirm-modal {
    background: var(--z-surface, #ffffff);
    border-radius: var(--z-radius-lg, 16px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    width: 100%;
    padding: 32px 28px 24px;
    text-align: center;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.lojista-confirm-overlay.is-open .lojista-confirm-modal {
    transform: scale(1) translateY(0);
}

/* Icon circle */
.lojista-confirm-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2rem;
    animation: confirmIconPulse 1.5s ease-in-out infinite;
}

.lojista-confirm-icon--danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.lojista-confirm-icon--warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

@keyframes confirmIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Title */
.lojista-confirm-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--z-text, #271812);
    margin: 0 0 8px;
}

/* Message */
.lojista-confirm-message {
    font-size: 0.9rem;
    color: var(--z-text-secondary, #5b4137);
    line-height: 1.5;
    margin: 0 0 24px;
}

/* Action buttons */
.lojista-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.lojista-confirm-actions .lojista-btn {
    flex: 1;
    max-width: 160px;
    height: 44px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
}

/* Confirm button animation */
.lojista-confirm-btn--confirm {
    animation: confirmBtnDanger 2s ease-in-out infinite;
}

@keyframes confirmBtnDanger {
    0%, 100% { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4); }
}

/* Keyboard hint */
.lojista-confirm-hint {
    font-size: 0.72rem;
    color: var(--z-text-muted, #8f7065);
    margin-top: 16px;
    opacity: 0.6;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lojista-confirm-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .lojista-confirm-modal {
        transform: none;
        transition: none;
    }
    
    .lojista-confirm-overlay.is-open .lojista-confirm-modal {
        transform: none;
    }
    
    .lojista-confirm-icon {
        animation: none;
    }
    
    .lojista-confirm-btn--confirm {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .lojista-confirm-overlay {
        padding: 16px;
        align-items: flex-end;
    }
    
    .lojista-confirm-modal {
        padding: 24px 20px 20px;
        border-radius: var(--z-radius-lg, 16px) var(--z-radius-lg, 16px) 0 0;
        transform: translateY(20px);
    }
    
    .lojista-confirm-overlay.is-open .lojista-confirm-modal {
        transform: translateY(0);
    }
    
    .lojista-confirm-actions {
        flex-direction: column-reverse;
    }
    
    .lojista-confirm-actions .lojista-btn {
        max-width: none;
    }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

/* Tooltip for collapsed sidebar */
.lojista-sidebar.is-collapsed .lojista-nav-item {
    position: relative;
}

.lojista-sidebar.is-collapsed .lojista-nav-item::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    padding: 7px 14px;
    background: var(--z-text, #271812);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lojista-sidebar.is-collapsed .lojista-nav-item:hover::after {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991px) {
    .lojista-topbar {
        left: 0;
    }

    .lojista-sidebar {
        transform: translateX(-100%);
    }

    .lojista-sidebar.is-open {
        transform: translateX(0);
    }

    .lojista-sidebar-overlay.is-visible {
        display: block;
        opacity: 1;
    }

    .lojista-main {
        margin-left: 0;
    }

    .lojista-mobile-toggle {
        display: inline-flex;
    }

    .lojista-sidebar-toggle--desktop {
        display: none !important;
    }

    .lojista-content {
        padding: 20px 16px;
    }

    .lojista-footer {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .lojista-form-grid--2,
    .lojista-form-grid--3,
    .lojista-form-grid--4 {
        grid-template-columns: 1fr;
    }

    .lojista-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lojista-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .lojista-stats-grid {
        grid-template-columns: 1fr;
    }

    .lojista-content {
        padding: 16px 12px;
    }

    .lojista-card-body {
        padding: 16px;
    }

    .lojista-card-header {
        padding: 14px 16px;
    }

    .lojista-filter-bar {
        flex-direction: column;
    }

    .lojista-topbar {
        padding: 0 12px;
    }

    .lojista-topbar-store {
        font-size: 0.85rem;
    }
}

/* ── ACCESSIBILITY ─────────────────────────────────────────── */

/* Skip Link */
.lojista-skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--z-primary, #a73a00);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s;
}

.lojista-skip-link:focus {
    top: 0;
    outline: 3px solid var(--z-primary-light, #ff5c00);
    outline-offset: 2px;
}

/* Focus Visible — estilo de foco acessível */
.lojista-nav-item:focus-visible,
.lojista-btn:focus-visible,
.lojista-topbar-btn:focus-visible,
.lojista-form-control:focus-visible,
.lojista-form-select:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--z-primary, #a73a00);
    outline-offset: 2px;
}

/* Remove outline padrão, mantém apenas focus-visible */
.lojista-nav-item:focus:not(:focus-visible),
.lojista-btn:focus:not(:focus-visible),
.lojista-topbar-btn:focus:not(:focus-visible) {
    outline: none;
}

/* High Contrast — suporte a prefers-contrast */
@media (prefers-contrast: high) {
    .lojista-sidebar {
        border-right-width: 2px;
    }

    .lojista-nav-item--active {
        border-left: 3px solid var(--z-primary, #a73a00);
    }

    .lojista-btn {
        border-width: 2px;
    }

    .lojista-form-control,
    .lojista-form-select {
        border-width: 2px;
    }
}

/* Reduced Motion — respeitar preferência do usuário */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .lojista-sidebar {
        transition: none;
    }

    .lojista-main {
        transition: none;
    }

    .lojista-topbar {
        transition: none;
    }

    /* Skeleton loading — sem animação */
    .lojista-skeleton,
    .lojista-chart-skeleton,
    .lojista-stat-card-skeleton {
        animation: none;
        background: var(--z-surface-2, #f8f9fa);
    }
}

/* Screen Reader Only — conteúdo visível apenas para leitores de tela */
.lojista-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── FORM MODAL ─────────────────────────────────────────────── */
.lojista-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lojista-modal-overlay.is-open {
    display: flex;
    opacity: 1;
}

.lojista-modal {
    background: var(--z-surface, #fff);
    border-radius: var(--z-radius-lg, 16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
}

.lojista-modal-overlay.is-open .lojista-modal {
    transform: translateY(0) scale(1);
}

.lojista-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--z-border, rgba(0,0,0,0.08));
}

.lojista-modal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lojista-modal-header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--z-primary-glow, rgba(167, 58, 0, 0.1));
    color: var(--z-primary, #a73a00);
}

.lojista-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--z-text, #271812);
    margin: 0;
}

.lojista-modal-subtitle {
    font-size: 0.8rem;
    color: var(--z-text-muted, #8f7065);
    margin: 2px 0 0;
}

.lojista-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--z-text-muted, #8f7065);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--z-transition, 0.2s);
}

.lojista-modal-close:hover {
    background: var(--z-surface-hover, #f1f3f5);
    color: var(--z-text, #271812);
}

.lojista-modal-body {
    padding: 24px;
}

.lojista-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--z-border, rgba(0,0,0,0.08));
}

@media (max-width: 576px) {
    .lojista-modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .lojista-modal {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }
}

/* Focus Trap — para modal e drawer */
.lojista-focus-trap {
    overflow: hidden;
}

/* Aria live region para notificações */
.lojista-toast-container[aria-live] {
    /* Garante que leitores de tela anunciem novos toasts */
}

/* ════════════════════════════════════════════════════════════════
 *  ORDER NOTIFICATION POPUP
 * ════════════════════════════════════════════════════════════════ */

#merchant-order-popup-container {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: 100%;
    pointer-events: none;
}

.m-popup-overlay {
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.m-popup-overlay.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.m-popup-overlay.is-hiding {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.m-popup-overlay.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.m-popup-card {
    background: var(--z-surface, #fff);
    border: 1px solid var(--z-border, rgba(0,0,0,0.08));
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: popupSlideIn 0.35s ease-out;
}

@keyframes popupSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.m-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--z-border, rgba(0,0,0,0.06));
}

.m-popup-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--z-primary, #ea580c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: popupIconPulse 1s ease-in-out infinite;
}

@keyframes popupIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.m-popup-header-info {
    flex: 1;
    min-width: 0;
}

.m-popup-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--z-text, #1a1a1a);
}

.m-popup-subtitle {
    font-size: 0.82rem;
    color: var(--z-text-secondary, #666);
}

.m-popup-amount {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--z-primary, #ea580c);
    white-space: nowrap;
}

.m-popup-body {
    padding: 12px 16px;
}

.m-popup-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--z-text-secondary, #666);
    margin-bottom: 6px;
}

.m-popup-items {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--z-border, rgba(0,0,0,0.08));
}

.m-popup-items-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--z-text-muted, #999);
    margin-bottom: 6px;
}

.m-popup-items-list {
    max-height: 140px;
    overflow-y: auto;
}

.m-popup-item {
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--z-text, #1a1a1a);
}

.m-popup-item-qty {
    font-weight: 700;
    color: var(--z-primary, #ea580c);
    margin-right: 4px;
}

.m-popup-item-name {
    font-weight: 500;
}

.m-popup-item-size {
    color: var(--z-text-secondary, #666);
}

.m-popup-item-obs {
    font-size: 0.78rem;
    color: var(--z-text-muted, #999);
    font-style: italic;
    margin-top: 2px;
}

.m-popup-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--z-border, rgba(0,0,0,0.06));
}

.m-popup-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.m-popup-btn:active {
    transform: scale(0.96);
}

.m-popup-btn--details {
    background: var(--z-bg, #f3f4f6);
    color: var(--z-text-secondary, #666);
}
.m-popup-btn--details:hover {
    background: var(--z-border, #e5e7eb);
}

.m-popup-btn--reject {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.m-popup-btn--reject:hover {
    background: #fee2e2;
}

.m-popup-btn--accept {
    background: var(--z-primary, #ea580c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}
.m-popup-btn--accept:hover {
    background: #dc4a0a;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

/* Badge de novos pedidos no header */
.m-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    #merchant-order-popup-container {
        right: 8px;
        left: 8px;
        max-width: none;
    }
    .m-popup-footer {
        flex-direction: column;
    }
    .m-popup-btn {
        width: 100%;
    }
}
