:root {
    --primary-color: #4b1e4d; /* Cor Açaí */
    --accent-color: #6a1b9a;
    --text-color: #1a1a1a;
    --text-muted: #666;
    --text-light: #777;
    --success-color: #2e7d32;
    --bg-color: #f8f9fa;
    --header-bg: #fff;
    --nav-bg: #fff;
    --nav-active: #4b1e4d;
    --nav-inactive: #adb5bd;
    --border-color: #eee;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.05);
    --border-radius: 12px;
}

.mobile-container {
    width: 100%;
    max-width: 100%;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.mobile-app {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-user-select: none;
    user-select: none;
    overflow-x: hidden;
}

/* Header fixo no topo */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding-top: env(safe-area-inset-top);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 16px;
}

.header-title-group {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.1;
}

.header-subtitle {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-back {
    font-size: 20px;
    color: var(--text-color);
    padding: 8px;
    text-decoration: none;
    margin-right: 8px;
}

/* Conteúdo principal com scroll */
.mobile-content {
    margin-top: calc(64px + env(safe-area-inset-top));
    margin-bottom: calc(72px + env(safe-area-inset-bottom));
    padding: 16px;
    min-height: calc(100vh - 136px);
}

/* Bottom Navigation fixo embaixo */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background-color: var(--nav-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--nav-inactive);
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--nav-active);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Utilitários de UI Mobile */
.mobile-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.02);
}

.mobile-card h2, .mobile-card h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.primary { background: #e3f2fd; color: #1976d2; }
.status-badge.success { background: #e8f5e9; color: #2e7d32; }
.status-badge.warning { background: #fff3e0; color: #ef6c00; }
.status-badge.error { background: #ffebee; color: #c62828; }

.btn-mobile-primary {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.2s;
}

.btn-mobile-primary:active {
    opacity: 0.8;
}

/* Compatibilidade com classes do módulo de endereços */
.addresses-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.02);
}

.addresses-form-card {
    background: #fff;
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(106, 27, 154, 0.08) !important;
    overflow: visible;
}

.addresses-form-card.is-open {
    animation: addressFormIn 0.24s ease-out;
}

#enderecos-page.endereco-form-open .addresses-card {
    margin-bottom: 12px;
}

@keyframes addressFormIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.list-item {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: relative;
}

.list-item.padrao {
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.badge-padrao {
    background: var(--accent-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.btn-purple-action {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-purple-action:hover { background: #5a32a3; color: #fff; }

/* Toasts e loader usados pelo módulo de endereços */
#enderecos-toast-container { position: fixed; right: 16px; top: 16px; z-index: 99999; }
.enderecos-toast { margin-bottom: 8px; padding: 10px 14px; border-radius: 10px; color: #fff; box-shadow: 0 8px 18px rgba(0,0,0,0.18); font-size: 14px; max-width: 340px; animation: enderecosToastIn .22s ease-out; }
.enderecos-toast.info { background: #333; }
.enderecos-toast.success { background: #28a745; }
.enderecos-toast.warning { background: #d97706; }
.enderecos-toast.error { background: #d9534f; }
.enderecos-toast-title { font-weight: 700; line-height: 1.2; }
.enderecos-toast-message { margin-top: 2px; opacity: 0.95; }
.enderecos-toast.hide { opacity: 0; transform: translateY(-6px); transition: opacity .28s ease, transform .28s ease; }

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

@media (max-width: 768px) {
    #enderecos-toast-container {
        right: 12px;
        left: 12px;
        top: 12px;
    }

    .enderecos-toast {
        max-width: none;
    }
}

#enderecos-loader { position: fixed; left:0; top:0; right:0; bottom:0; background: rgba(255,255,255,0.6); z-index: 99998; display:flex; align-items:center; justify-content:center; }
#enderecos-loader .spinner { width:48px; height:48px; border-radius:50%; border:4px solid rgba(0,0,0,0.08); border-top-color:var(--accent-color); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Estilos do mapa e displays usados pela view de endereços */
#map {
    width: 100%;
    height: 320px; /* altura padrão para visualização móvel */
    border-radius: 10px;
    margin: 12px 0;
    background: #eee;
}

.coordenadas-display { display: none; margin-top: 8px; color: var(--text-muted); font-size: 14px; }
.distancia-display { display: none; margin-top: 8px; }
.info-box { padding: 10px; border-radius: 8px; font-size: 14px; }
.info-box.success { background: #e8f5e9; color: #2e7d32; }
.info-box.warning { background: #fff8e1; color: #ef6c00; }
.info-box.error { background: #ffebee; color: #c62828; }

.distancia-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin: 5px 0;
}

.distancia-ok {
    background: #e6ffed;
    color: #22863a;
}

.distancia-aviso {
    background: #fff5f5;
    color: #cb2431;
}

.frete-info-block {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0;
    align-items: center;
}

.frete-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

.frete-calculado {
    background: #dbeafe;
    color: #1e3a8a;
}

.frete-pendente {
    background: #fef3c7;
    color: #92400e;
}

.frete-bloqueado {
    background: #fee2e2;
    color: #991b1b;
}

/* Dashboard do cliente */
.welcome-header { margin-bottom: 20px; }
.welcome-header h1 { font-size: 20px; font-weight: 700; margin: 0; color: var(--primary-color); }
.mobile-hello { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-color); }
.painel-order-link { margin-top: 10px; text-align: center; }
.card-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.btn-mobile-secondary {
    background: #f0f0f0;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; padding: 12px; border-radius: 12px; text-align: center; box-shadow: var(--card-shadow); }
.stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--primary-color); }
.stat-label { font-size: 12px; color: var(--text-muted); }
.shortcut-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.shortcut-item { display: flex; align-items: center; text-decoration: none; color: inherit; gap: 12px; }
.shortcut-icon {
    width: 40px;
    height: 40px;
    background: #f3e5f5;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.shortcut-text { flex: 1; display: flex; flex-direction: column; }
.shortcut-text strong { font-size: 14px; }
.shortcut-text span { font-size: 12px; color: var(--text-muted); }

/* Favoritos */
.favorites-header {
    margin-top: 20px;
}

.favorites-title {
    font-weight: 800;
    color: #4A148C;
    font-size: 1.4rem;
}

.favorites-new-order-btn {
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

.favorite-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.favorite-body {
    padding: 18px;
}

.favorite-name {
    font-weight: 700;
    color: #333;
    margin: 0;
    font-size: 1rem;
}

.btn-remove {
    border: 1px solid #ffd7d7;
    background: #fff5f5;
    color: #c62828;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-remove:active {
    transform: scale(0.96);
    background: #ffe9e9;
}

.favorite-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 12px;
}

.favorite-chip {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f4ecff;
    color: #5b3386;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.favorite-chip-success {
    background: #e6ffed;
    color: #22863a;
}

.favorite-chip-warning {
    background: #fff5e6;
    color: #b45309;
}

.favorite-details {
    background: #fdf7ff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
}

.favorite-details summary {
    font-size: 0.82rem;
    font-weight: 700;
    color: #5b3386;
    cursor: pointer;
    list-style: none;
}

.favorite-details summary::-webkit-details-marker {
    display: none;
}

.favorite-details ul {
    list-style: none;
    padding: 8px 0 0;
    margin: 0;
    font-size: 0.8rem;
    color: #6d4c7d;
}

.favorite-item-block + .favorite-item-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ead7ff;
}

.favorite-item-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: #1f1f1f;
}

.favorite-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.favorite-item-price {
    font-size: 0.92rem;
    font-weight: 800;
    color: #2e7d32;
}

.favorite-details li {
    margin-bottom: 4px;
    list-style: disc;
    margin-left: 16px;
    color: #5c5f67;
    line-height: 1.45;
}

.favorite-details li i {
    font-size: 0.62rem;
    opacity: 0.6;
    margin-top: 4px;
}

.favorite-total-line {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #dfc8ff;
    font-weight: 700;
    color: #4A148C;
    display: flex;
    align-items: flex-start;
}

.fav-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 30, 0.52);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.fav-dialog-card {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
    padding: 18px;
}

.fav-dialog-card h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #3a2146;
}

.fav-dialog-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #5d4f67;
}

.fav-dialog-card.is-warning h4 {
    color: #a15b00;
}

.fav-dialog-card.is-danger h4 {
    color: #b3261e;
}

.fav-dialog-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #6a5774;
    font-size: 0.84rem;
}

.fav-dialog-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.fav-dialog-actions.single {
    justify-content: stretch;
}

.fav-dialog-btn {
    border: 0;
    border-radius: 10px;
    height: 42px;
    padding: 0 14px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.fav-dialog-btn.primary {
    background: #5a2f88;
    color: #fff;
    flex: 1;
}

.fav-dialog-btn.secondary {
    background: #f2edf7;
    color: #4f3a63;
    flex: 1;
}

.favorite-disabled-btn {
    border-radius: 12px;
    color: #999;
    font-size: 0.85rem;
}

.favorite-repeat-note {
    font-size: 0.72rem;
}

.empty-fav-icon {
    width: 80px;
    height: 80px;
    background: #f3e5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #ce93d8;
}

.empty-fav-title {
    font-weight: 700;
    color: #4A148C;
}

.empty-fav-subtitle {
    font-size: 0.9rem;
}

/* Pedidos */
.order-card { padding: 16px; margin-bottom: 12px; }
.order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.order-id { display: flex; flex-direction: column; }
.order-id strong { font-size: 16px; color: var(--primary-color); }
.order-date { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.order-items-preview { background: #f9f9f9; border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.order-item-line { display: flex; font-size: 13px; margin-bottom: 4px; }
.item-qty { font-weight: 700; margin-right: 8px; color: var(--primary-color); }
.item-name { flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.item-price { font-weight: 500; margin-left: 8px; }
.order-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0f0f0; padding-top: 12px; }
.order-total strong { font-size: 18px; color: #2e7d32; display: block; }
.order-frete-line {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.order-grand-total {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
}
.order-actions { display: flex; gap: 8px; }
.btn-repeat, .btn-details {
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-repeat { background: var(--primary-color); color: #fff; }
.btn-details { background: #eee; color: var(--text-color); }
.order-details-drawer hr { border: 0; border-top: 1px solid #eee; margin: 12px 0; }
.details-list { margin: 8px 0; padding-left: 18px; font-size: 12px; color: var(--text-muted); list-style-type: disc; }
.action-buttons-full { margin-top: 16px; }
.btn-favorite {
    width: 100%;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-favorite.active { color: #e91e63; border-color: #f8bbd0; background: #fdf2f5; }
.status-badge { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 700; text-transform: uppercase; }
.status-pendente { background: #fff3e0; color: #ef6c00; }
.status-preparacao,
.status-preparando { background: #e3f2fd; color: #1976d2; }
.status-pronto { background: #e8f5e9; color: #2e7d32; }
.status-motoboy,
.status-saiu_entrega { background: #f3e5f5; color: #7b1fa2; }
.status-entregue { background: #e8f5e9; color: #2e7d32; }
.status-cancelado { background: #ffebee; color: #c62828; }

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Perfil */
.profile-info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    margin-bottom: 24px;
    border: none;
}
.profile-avatar { font-size: 48px; opacity: 0.9; }
.profile-main-info h2 { font-size: 18px; margin: 0; color: #fff; }
.mobile-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.mobile-form h3 { font-size: 16px; margin: 0 0 16px 0; color: var(--primary-color); display: flex; align-items: center; gap: 8px; }
.section-desc { font-size: 12px; color: var(--text-muted); margin-top: -12px; margin-bottom: 16px; }
.mobile-input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-color); }
.mobile-input-group input { width: 100%; padding: 12px; border-radius: 10px; border: 1.5px solid #eee; font-size: 15px; margin-bottom: 12px; }
.mobile-input-group input:focus { border-color: var(--primary-color); outline: none; }
.mobile-input-group.readonly input { background: #f5f5f5; border-color: #eee; color: #888; }
.input-help { display: block; font-size: 11px; color: var(--text-muted); margin-top: -8px; margin-bottom: 12px; }
.form-actions-fixed { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 12px; }
.btn-logout-link { text-align: center; color: #c62828; font-size: 14px; font-weight: 600; text-decoration: none; padding: 10px; display: block; }
.text-white-50 { color: rgba(255, 255, 255, 0.7) !important; }

/* Favoritos e notificacoes */
.favorites-list,
.notifications-list {
    padding-bottom: 80px;
}

.favorites-list-extended {
    padding-bottom: 90px;
}

.favorite-alert-success {
    border-radius: 12px;
    font-size: 0.85rem;
}

.hidden-form,
.is-hidden-initial {
    display: none;
}

.favorite-swal-list {
    text-align: left;
    margin: 8px 0 0;
    padding-left: 18px;
}

.favorite-swal-msg {
    margin: 0;
}

.favorite-swal-total {
    margin: 6px 0 0;
}

.notification-card.unread {
    background: #fdf7ff !important;
    border-left: 4px solid #8b4789 !important;
}

.notifications-header {
    margin-top: 20px;
}

.notifications-title {
    font-weight: 800;
    color: #4A148C;
    font-size: 1.4rem;
}

.notification-read-btn {
    border-radius: 20px;
    font-size: 0.75rem;
    padding: 5px 15px;
    border: 1px solid #8B4789;
    color: #8B4789;
    background: transparent;
}

.notification-card {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
    position: relative;
}

.notification-icon {
    min-width: 24px;
}

.notification-icon-glyph {
    font-size: 1.2rem;
}

.notification-content {
    flex: 1;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.notification-title {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.notification-time {
    font-size: 0.7rem;
    color: #999;
}

.notification-msg {
    font-size: 0.85rem;
    color: #666;
    margin: 4px 0 8px;
    line-height: 1.4;
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-date {
    font-size: 0.7rem;
    color: #bbb;
}

.notification-new-badge {
    background: rgba(139, 71, 137, 0.1);
    color: #8B4789;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.notifications-empty-state {
    margin-top: 50px;
}

.notifications-empty-icon {
    opacity: 0.3;
}

.notifications-empty-title {
    font-weight: 600;
}

.order-label,
.order-total-label {
    font-size: 11px;
}

.order-detail-block {
    margin-bottom: 12px;
}

.order-detail-title {
    font-size: 14px;
}

.order-empty-cta {
    margin-top: 20px;
}

.profile-phone {
    font-size: 14px;
    margin: 4px 0 0;
}

.legacy-header-subtitle {
    color: #999;
}

.legacy-header-notif-link {
    position: relative;
}

.legacy-header-notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Compatibilidade para telas de login/cadastro standalone */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    font-size: 15px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-secondary {
    background: #efefef;
    color: var(--text-color);
}

.alert {
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.alert-danger {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #0d47a1;
}

/* ===== Modal Bottom-Sheet do Painel ===== */
.painel-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    /* animação de entrada */
    opacity: 0;
    transition: opacity 0.25s ease;
}

.painel-modal-overlay.is-open {
    opacity: 1;
}

.painel-modal-overlay[hidden] {
    display: none !important;
}

.painel-modal-sheet {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* slide-up */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.painel-modal-overlay.is-open .painel-modal-sheet {
    transform: translateY(0);
}

.painel-modal-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

.painel-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.painel-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.painel-modal-close {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.painel-modal-close:active {
    background: #e0e0e0;
}

.painel-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.painel-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

/* Conteúdo interno do modal de pedido */
.order-modal-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.order-modal-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
}

.order-modal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-modal-row:last-of-type {
    border-bottom: none;
}

.order-modal-row-icon {
    width: 36px;
    height: 36px;
    background: #f3e5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 15px;
    flex-shrink: 0;
}

.order-modal-row-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.order-modal-row-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    display: block;
}

.order-modal-total-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--success-color);
}

.order-modal-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 15px;
}

.order-modal-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Conteúdo formatado do modal de pedido */
.modal-order-meta {
    background: #f9f5ff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 14px;
    color: var(--text-color);
}

.modal-meta-row strong {
    font-weight: 700;
    color: var(--primary-color);
}

.modal-meta-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.modal-items-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-item-block {
    border: 1px solid #ede7f6;
    border-radius: 10px;
    overflow: hidden;
}

.modal-item-header {
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
}

.modal-resumo-fields {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-resumo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    line-height: 1.5;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
}

.modal-resumo-row:last-child {
    border-bottom: none;
}

.modal-resumo-label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: 90px;
}

.modal-resumo-label::after {
    content: ':';
}

.modal-resumo-value {
    color: var(--text-color);
    flex: 1;
}
