@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8f7f2;
    --card-bg: #efede7;
    --card-text: #1a1a1a;
    --accent-color: #e50914; /* Vermelho principal */
    --accent-glow: rgba(229, 9, 20, 0.12);
    --text-color: #1a1a1a;
    --text-dim: #707070;
    --border-color: #e8e6df;
    --success-color: #28a745;
    --error-color: #e50914;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
}

/* Layout */
.container {
    padding: 1rem;
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Mobile-first Navigation */
header {
    background-color: var(--card-bg);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Bottom Navigation Bar (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
}

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

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

/* Desktop overrides */
@media (min-width: 768px) {
    
    .desktop-sidebar {
        display: block !important;
        width: 250px;
        height: 100vh;
        background-color: #111;
        color: #eee;
        position: fixed;
        top: 0;
        left: 0;
        padding: 2rem 1rem;
    }
    
    .admin-content {
        margin-left: 250px;
    }
    
    .desktop-menu {
        display: none;
    }
}

.desktop-menu {
    display: none;
}

.desktop-sidebar {
    display: none;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.2rem;
    color: var(--card-text);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    background-color: var(--accent-color);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.8rem;
    border: none;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    width: 100%;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
    box-shadow: 0 0 10px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem;
    background-color: #fff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

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

/* Grid Layouts */
.grid-products {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 80px; /* space for bottom nav */
}

.grid-products .card {
    width: 100%;
    max-width: 400px;
}

/* Admin Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Kanban */
.kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 0 0 280px;
    background: #e8e6df;
    padding: 1rem;
    border-radius: 8px;
}

.kanban-column h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.order-card {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Utilities */
.hidden {
    display: none !important;
}

#map {
    height: 400px;
    width: 100%;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.sidebar-nav {
    list-style: none;
    margin-top: 2rem;
}

.sidebar-nav li {
    margin-bottom: 1rem;
}

.sidebar-nav a {
    color: #eee;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: var(--accent-color);
}

/* Checkout */
.checkout-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.pix-box {
    background: #fff;
    padding: 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
}

.pix-key {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 1rem 0;
    word-break: break-all;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}
/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Mini Map */
#mini-map {
    height: 250px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}
/* Sidebar Cart (Off-canvas) */
.cart-sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.cart-sidebar {
    position: fixed;
    top: 0; right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    height: 100dvh;
    background-color: var(--bg-color);
    z-index: 1100;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 1.5rem;
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-sidebar-footer {
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}
/* iFood-like Modal Updates */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
        height: 600px;
    }
}

.modal-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

@media (min-width: 768px) {
    .modal-header-mobile {
        display: none;
    }
}

.modal-img-container {
    width: 100%;
    height: 250px;
}

@media (min-width: 768px) {
    .modal-img-container {
        width: 50%;
        height: 100%;
    }
}

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

.modal-right-col {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .modal-right-col {
        width: 50%;
    }
}

.modal-header-desktop {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}
@media (min-width: 768px) {
    .modal-header-desktop {
        display: flex;
    }
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
}

.modal-price {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.modal-store-info {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.modal-store-name {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal-store-delivery {
    font-size: 0.85rem;
    color: var(--text-dim);
    border-top: 1px dashed var(--border-color);
    padding-top: 0.5rem;
}

.modal-comments-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.modal-textarea {
    width: 100%;
    height: 80px;
    resize: none;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 4px;
    font-family: inherit;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
    gap: 1rem;
}

.modal-qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    height: 48px;
}

.modal-qty-controls button {
    background: transparent;
    border: none;
    width: 40px;
    height: 100%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--accent-color);
}

.modal-qty-controls span {
    width: 30px;
    text-align: center;
    font-weight: 600;
}

.modal-add-btn {
    flex: 1;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
/* Checkout iFood Style */
.checkout-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 80px;
}

@media (min-width: 900px) {
    .checkout-container {
        flex-direction: row;
        align-items: flex-start;
    }
    .checkout-left {
        flex: 2;
    }
    .checkout-right {
        flex: 1;
        position: sticky;
        top: 100px;
    }
}

.checkout-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.checkout-summary {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-top: 0.8rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.summary-line.total {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.2rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 600px) {
    .grid-2-col {
        grid-template-columns: 1fr 1fr;
    }
    .grid-1-2-col {
        grid-template-columns: 1fr 2fr;
    }
}
/* Delivery Toggle */
.delivery-toggle {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}
.toggle-btn {
    background: none;
    border: none;
    padding: 0.5rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; 
    font-family: inherit;
}
.toggle-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
/* --- ADMIN REDESIGN --- */
body:has(.admin-content) {
    background-color: #f4f5f7;
}

@media (min-width: 768px) {
    .desktop-sidebar {
        background-color: #ffffff !important;
        color: var(--text-color) !important;
        box-shadow: 2px 0 15px rgba(0,0,0,0.05);
        border-right: 1px solid var(--border-color);
    }
}

.desktop-sidebar h2 {
    color: var(--accent-color) !important;
}

.sidebar-nav a {
    color: var(--text-dim) !important;
    border-radius: 8px;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600 !important;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: var(--accent-glow) !important;
    color: var(--accent-color) !important;
}

.dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 1.5rem !important;
}

.stat-card {
    background: #fff !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    border-radius: 12px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem !important;
}

.stat-value {
    font-size: 2.5rem !important;
    color: var(--text-color) !important;
    margin-bottom: 0.5rem;
}

.kanban-board {
    gap: 1.5rem !important;
    display: flex;
    overflow-x: auto;
}

.kanban-column {
    background: #f8f9fa !important;
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
    padding: 1.2rem !important;
    flex: 1 !important;
    min-width: 220px !important;
    display: flex !important;
    flex-direction: column;
    max-height: 70vh;
}

.kanban-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for kanban items */
.kanban-items::-webkit-scrollbar {
    width: 6px;
}
.kanban-items::-webkit-scrollbar-track {
    background: transparent;
}
.kanban-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.kanban-items::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.kanban-column h3 {
    text-align: left !important;
    font-size: 1rem !important;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-dim);
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.2rem !important;
}

#col-pendente h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-preparando h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-rota h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-concluido h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-finalizado h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }

.order-card {
    border: 1px solid var(--border-color);
    border-radius: 10px !important;
    padding: 1.2rem !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff !important;
    display: flex;
    flex-direction: column;
}
.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06) !important;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}
.order-id {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
}
.order-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.order-badge.entrega {
    background: #fff3e0;
    color: #f57c00;
}
.order-badge.retirada {
    background: #e3f2fd;
    color: #1976d2;
}

.order-customer {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.order-items {
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.order-payment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--success-color);
}

.status-select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #f8f9fa;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.status-select:focus, .status-select:hover {
    border-color: var(--accent-color);
    outline: none;
    background: #fff;
}
@media (min-width: 768px) {
    header.mobile-header {
        display: none !important;
    }
}
header.mobile-header {
    justify-content: space-between !important;
}

#col-pendente h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-preparando h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-rota h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
#col-concluido h3 { border-bottom-color: var(--accent-color) !important; color: var(--accent-color) !important; }
/* --- STOREFRONT REDESIGN --- */
header {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
    padding: 1rem 5% !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    justify-content: center !important;
}
.hero-banner {
    margin-top: 1rem;
    transition: transform 0.3s ease;
}
.hero-banner:hover {
    transform: translateY(-2px);
}
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}
.product-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    height: 160px;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    border-color: #ffcccc;
}
.product-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}
.product-desc {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.product-price {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent-color);
    margin-top: auto;
}
.product-img {
    width: 140px;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 600px) {
    .hero-banner {
        height: 220px !important;
        border-radius: 12px !important;
        margin-top: 0.5rem;
    }
    .hero-banner h1 {
        font-size: 1.8rem !important;
    }
    .grid-products {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .product-card {
        height: 140px;
    }
    .product-img {
        width: 120px;
    }
}
@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        overflow-x: hidden;
    }
    .kanban-column {
        min-width: 100% !important;
        margin-bottom: 1rem;
    }
}

/* --- Custom Tooltips --- */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::before,
.custom-tooltip::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    pointer-events: none;
}

.custom-tooltip::before {
    content: attr(data-tooltip);
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #fff;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    width: max-content;
    max-width: 220px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.custom-tooltip::after {
    content: '';
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px;
    border-style: solid;
    border-color: var(--accent-color) transparent transparent transparent;
    margin-bottom: -4px;
}

.custom-tooltip:hover::before,
.custom-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- Chat Widget Styles --- */
.chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
}
.chat-fab:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.chat-header {
    background: var(--accent-color);
    color: white;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
    background: #f9f9f9;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.chat-msg {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}
.chat-msg.customer {
    background: var(--accent-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.chat-msg.admin {
    background: #e9ecef;
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
.chat-msg-time {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: right;
    margin-top: 4px;
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}
.chat-input-area input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}
.chat-send-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* --- Admin Chat Layout --- */
.admin-chat-layout {
    display: flex;
    height: 70vh;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}
.chat-sessions-list {
    width: 300px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: #f9f9f9;
}
.chat-session-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-session-item:hover {
    background: #f0f0f0;
}
.chat-session-item.active {
    background: #e3f2fd;
    border-left: 4px solid var(--accent-color);
}
.chat-admin-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Admin Chat Responsive --- */
@media (max-width: 768px) {
    .admin-chat-layout {
        flex-direction: column;
        height: calc(100vh - 120px); /* Fill most of screen */
    }
    .chat-sessions-list {
        width: 100%;
        height: 120px;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .chat-session-item {
        min-width: 200px;
        border-bottom: none;
        border-right: 1px solid #eee;
        padding: 0.5rem;
    }
    .chat-admin-panel {
        flex: 1;
        height: auto;
    }
    #admin-chat-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    #admin-chat-close-btn {
        width: 100% !important;
        margin-top: 0.5rem;
    }
}

/* --- Chat Typing Indicator --- */
.typing-indicator {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.2rem;
    font-style: italic;
    background: transparent !important;
}
.typing-indicator span {
    animation: typing-dot 1.4s infinite both;
    font-weight: bold;
    font-size: 1.2rem;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* --- Admin Bottom Nav --- */
.admin-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 500px;
    height: 72px;
    background-color: #262626;
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-x: auto;
    gap: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.admin-bottom-nav::-webkit-scrollbar {
    display: none;
}

.admin-bottom-nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    height: 60px;
    flex: 0 0 23%; /* Exibe aprox. 4 itens e meio na tela */
    border-radius: 30px;
    transition: all 0.2s;
}

.admin-bottom-nav-item i {
    font-size: 1.05rem;
    margin-bottom: 4px;
    -webkit-text-stroke: 0.5px #262626; /* Ajustado para o novo tamanho do ícone */
}

.admin-bottom-nav-item.active {
    background-color: rgba(229, 9, 20, 0.15);
    color: #ff3b3b;
}

.admin-bottom-nav-item.active i {
    -webkit-text-stroke: 0.5px #3a2223;
}

@media (min-width: 768px) {
    .admin-bottom-nav {
        display: none !important;
    }
}
