/* HEADER */
.app-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 20px;

    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
}

.logo img {
    height: 40px;
    border-radius: 50%;
}

/* RIGHT */
.right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* USER */
.user-chip {
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f1f1;
    font-size: 0.85rem;
    text-decoration: none;
    color: #333;
}

/* BALANCE */
.balance-chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff9800, #ffb347);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;

    animation: fadeIn 0.4s ease;
}

/* MENU BUTTON */
.menu-btn {
    border: none;
    background: #f1f1f1;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* OVERLAY */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);

    opacity: 0;
    visibility: hidden;

    display: flex;
    justify-content: flex-end;

    transition: 0.3s;
    z-index: 2000;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* PANEL */
.menu-panel {
    width: 280px;
    height: 100%;
    background: white;
    padding: 20px;

    transform: translateX(100%);
    transition: 0.3s;

    display: flex;
    flex-direction: column;
}

.menu-overlay.active .menu-panel {
    transform: translateX(0);
}

/* TOP */
.menu-top {
    display: flex;
    justify-content: flex-end;
}

.menu-top button {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

/* LINKS */
.menu-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.menu-links a {
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
}

.menu-links a:hover {
    background: #f5f5f5;
}

/* ANIMATION */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .balance-chip {
        display: inline-block; /* 🔥 agora aparece também no mobile */
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

/* =====================================
   DARK MODE
===================================== */

body.dark{
    background: #0f172a;
    color: #f1f1f1;
}

/* HEADER */
body.dark .app-header{

    background: #151f36;

    border-bottom:
        1px solid rgba(255,255,255,.08);
}

/* MENU */
body.dark .menu-panel{

    background: #0f172a;
}

/* LINKS */
body.dark .menu-links a{
    background: #0f172a;
    color: #f1f1f1;
}

body.dark .menu-links a:hover{

    background: rgba(255,255,255,.06);
}

/* USER CHIP */
body.dark .user-chip{

    background: #2a2a2a;

    color: white;
}

/* MENU BUTTON */
body.dark .menu-btn{

    background: #2a2a2a;

    color: white;
}

/* BOTÃO FECHAR */
body.dark .menu-top button{

    color: white;
}

.card-modo-dark {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 8px;
}

/* SWITCH */
body.dark .card-setting{
    color: white;
}

/* CARDS */
body.dark .balance-chip{

    box-shadow:
        0 0 15px rgba(255,152,0,.25);
}

/* ===================================
   DESKTOP SIDEBAR
=================================== */

@media (min-width: 800px) {

    .menu-btn {
        display: none;
    }

    .menu-overlay {
        position: fixed;

        top: 70px;
        left: 0;

        width: 280px;
        height: calc(100vh - 70px);

        opacity: 1 !important;
        visibility: visible !important;

        background: transparent;

        display: block;
        z-index: 999;
    }

    .menu-panel {

        width: 280px;
        height: 100%;

        transform: none !important;

        border-right: 1px solid rgba(0,0,0,.08);

        overflow-y: auto;
    }

    .menu-top {
        display: none;
    }

}