/* ==========================================
   RESTORED SHOPEE IDENTITY + SIDEBAR
   ========================================== */

:root {
    --shopee-orange: #ee4d2d;
    --shopee-bg: #f6f6f6;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--shopee-bg);
    color: #333;
    -webkit-font-smoothing: antialiased;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ==========================================
   SIDEBAR (SHOPEE STYLE)
   ========================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: #f4f4f4; /* Match logo background */
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: width var(--transition-speed) ease;
    border-right: 1px solid #ddd;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.app-wrapper.collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding: 20px 10px;
}

.sidebar-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.logo-box {
    cursor: pointer;
    transition: transform 0.2s;
}

.logo-img {
    height: auto;
    width: 100%;
    max-width: 180px;
    object-fit: contain;
    transition: all var(--transition-speed) ease;
}

.app-wrapper.collapsed .logo-img {
    max-width: 45px;
}

.btn-new-structure {
    width: 100%;
    background-color: var(--shopee-orange);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 25px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.btn-new-structure:hover {
    background-color: #d73a1c;
}

.app-wrapper.collapsed .btn-new-structure span {
    display: none;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #555;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-menu li.active a,
.nav-menu a:hover {
    background-color: #fce8e5;
    color: var(--shopee-orange);
    font-weight: 500;
}

.nav-menu a i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.app-wrapper.collapsed .nav-menu span {
    display: none;
}

.sidebar-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--shopee-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.user-email {
    font-size: 10px;
    color: #888;
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: none;
    color: #888;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    padding: 10px 0;
}

.app-wrapper.collapsed .user-details,
.app-wrapper.collapsed .btn-logout span {
    display: none;
}

/* ==========================================
   CONTEÚDO DASHBOARD (ORIGINAL SHOPEE)
   ========================================== */
.dashboard-container {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease;
    width: calc(100% - var(--sidebar-width));
}

.app-wrapper.collapsed .dashboard-container {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Red Banner */
.top-banner {
    background-color: var(--shopee-orange);
    height: 280px;
    position: relative;
    overflow: hidden;
    color: white;
}

.banner-bg-watermark {
    position: absolute;
    right: 5%;
    top: -20px;
    width: 400px;
    height: 400px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23f26b50" d="M30 40c0-11 9-20 20-20s20 9 20 20h10c5.5 0 10 4.5 10 10v30c0 5.5-4.5 10-10 10H20c-5.5 0-10-4.5-10-10V50c0-5.5 4.5-10 10-10h10zm20-15c-8.3 0-15 6.7-15 15h30c0-8.3-6.7-15-15-15z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
}

.top-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.user-profile-top {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: white;
    color: var(--shopee-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.user-profile-name {
    font-size: 14px;
    font-weight: 500;
}

.header-content {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-shopee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 15px;
}

.header-title {
    color: white !important;
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 8px;
}

.date-badge {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

.header-content .nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.header-content .metrics-link {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.header-content .metrics-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Floating Card Area */
.main-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: -85px;
    z-index: 10;
}

.floating-value-card {
    position: relative; /* Base para o botão secreto */
    background-color: white;
    border-radius: 8px;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    width: 80%;
    margin: 0 auto 30px auto;
}

.floating-value-card .currency {
    color: var(--shopee-orange);
    font-size: 32px;
    font-weight: 700;
    vertical-align: top;
    margin-top: 10px;
    display: inline-block;
}

.floating-value-card .amount {
    color: var(--shopee-orange);
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
}

/* Grid Layout Original */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    margin-bottom: 50px;
}

.card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Metrics Original Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    flex-grow: 1;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    text-align: center;
    gap: 8px;
}

.metric-icon {
    font-size: 18px;
    color: var(--shopee-orange);
    margin-bottom: 2px;
    opacity: 0.7;
}

.border-right { border-right: 1px solid #f0f0f0; }
.border-bottom { border-bottom: 1px solid #f0f0f0; }

.metric-label {
    font-size: 13px;
    color: var(--shopee-orange);
    margin-bottom: 10px;
    font-weight: 500;
}

.metric-value {
    font-size: 20px;
    font-weight: 400;
    color: #333;
}

/* Chart Original Styles */
.chart-card { padding-bottom: 15px; }
.chart-header { border-bottom: none; padding-bottom: 0; }

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 10px 20px;
    font-size: 12px;
}

.chart-filters { display: flex; gap: 10px; }

.filter-btn {
    background-color: #f6f6f6;
    border: 1px solid #ddd;
    color: #555;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
}

.filter-btn.active {
    background-color: rgba(238, 77, 45, 0.1);
    color: var(--shopee-orange);
    border-color: var(--shopee-orange);
}

.chart-legend { display: flex; gap: 20px; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.line-red { width: 15px; height: 2px; background-color: var(--shopee-orange); }
.line-blue { width: 15px; height: 2px; background-color: #4a90e2; }

.chart-container { width: 100%; height: 250px; padding: 0 10px; }

.chart-footer {
    text-align: center;
    font-size: 11px;
    color: #888;
    margin-top: 15px;
    padding: 0 20px;
}

/* Top Products List Original */
.product-item-shopee {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
}

.product-item-shopee:last-child { border-bottom: none; }

.rank-shopee { font-size: 14px; color: var(--shopee-orange); width: 20px; margin-right: 5px; font-weight: bold; }

.product-img-shopee {
    width: 40px; height: 40px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    margin-right: 15px;
    background-size: cover;
    background-position: center;
}

.product-info-shopee { flex-grow: 1; font-size: 13px; color: #555; }
.product-price-shopee { font-size: 13px; color: var(--shopee-orange); font-weight: 500; }

/* FAB */
.floating-action-button {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

/* ==========================================
   MOBILE MENU TOGGLE
   ========================================== */
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-right: 15px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   RESPONSIVE OVERRIDES
   ========================================== */
@media (max-width: 1024px) {
    .sidebar {
        left: -100%;
        width: 280px;
        transition: left 0.3s ease;
    }

    .app-wrapper.mobile-open .sidebar {
        left: 0;
    }

    .app-wrapper.mobile-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 95;
    }

    .dashboard-container {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    
    .banner-bg-watermark {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .floating-value-card {
        width: 95%;
        padding: 20px 0;
    }

    .floating-value-card .amount {
        font-size: 48px;
    }

    .floating-value-card .currency {
        font-size: 24px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .header-title {
        font-size: 22px;
    }
    
    .top-banner {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .floating-value-card .amount {
        font-size: 36px;
    }

    .metric-value {
        font-size: 18px;
    }
    
    .login-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .logo-shopee {
        font-size: 22px;
    }
    
    .header-content .metrics-link {
        font-size: 12px;
        padding: 6px 12px;
    }
}

}

/* ==========================================
   VIP SALE SIMULATOR (SECRET)
   ========================================== */
.vip-sale-trigger {
    display: block !important; /* Force display if VIP */
    width: 10px;
    height: 10px;
    background-color: #ee4d2d;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.6;
    transition: all 0.2s;
    z-index: 9999;
    border: 1.5px solid #eee;
}

@media (max-width: 1024px) {
    .vip-sale-trigger { display: none !important; }
}

/* Notification Toast */
.sale-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #ffffff;
    color: #333;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid #ee4d2d;
    min-width: 300px;
}

.sale-notification.show {
    transform: translateX(0);
}

.sale-notification .icon-box {
    width: 40px;
    height: 40px;
    background-color: #fce8e5;
    color: #ee4d2d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sale-notification .msg-content {
    display: flex;
    flex-direction: column;
}

.sale-notification .msg-title {
    font-weight: 700;
    font-size: 14px;
    color: #ee4d2d;
}

.sale-notification .msg-detail {
    font-size: 13px;
    color: #666;
}

.sale-notification .prod-name {
    font-weight: 600;
    color: #333;
}

.sale-notification .commission-val {
    color: #2ecc71;
    font-weight: 700;
}
/* ==========================================
   LOGIN MODAL
   ========================================== */
#login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.login-modal-content {
    background-color: white;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    margin-top: 15px;
    font-size: 22px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--shopee-orange);
    outline: none;
}

.btn-login {
    width: 100%;
    background-color: var(--shopee-orange);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #d73a1c;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: #888;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.login-footer a {
    color: var(--shopee-orange);
    text-decoration: none;
}

/* WhatsApp Support Button */
.whatsapp-support {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25d366; /* WhatsApp Green */
    font-size: 26px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-decoration: none;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-support:hover {
    transform: scale(1.15) rotate(5deg);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.25);
    color: #128c7e; /* Darker WhatsApp Green */
}

@media (max-width: 768px) {
    .whatsapp-support {
        bottom: 20px;
        left: 20px;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}
