/* ==========================================================================
   Design System - Habitat Recompensas (Estilo Habitat Atendimento)
   ========================================================================== */

:root {
    /* Color Palette */
    --color-sidebar-bg: #3d2524;       /* Marrom chocolate escuro */
    --color-sidebar-hover: #4e3231;    /* Ligeiramente mais claro para hover */
    --color-sidebar-active: #2c1a19;   /* Tom de fundo do item ativo */
    
    --color-primary: #c2e600;          /* Verde-limão brilhante/neon */
    --color-primary-hover: #b4d600;    /* Verde-limão ligeiramente escurecido */
    --color-primary-glow: rgba(194, 230, 0, 0.4);
    --color-primary-light: #f6fad8;    /* Fundo verde-limão bem claro */
    
    --color-bg: #f9f8f4;               /* Creme suave/Marfim */
    --color-card-bg: #ffffff;          /* Branco puro */
    --color-text-main: #2c1c1b;        /* Marrom muito escuro/quase preto */
    --color-text-muted: #7d706f;       /* Marrom acinzentado para descrições */
    --color-border: #ebe7df;           /* Cinza quente/creme para bordas */
    
    --color-success: #28a745;          /* Verde padrão para sucesso */
    --color-success-light: #d4edda;
    --color-warning: #fd7e14;          /* Laranja */
    --color-danger: #dc3545;           /* Vermelho */
    --color-toast-bg: #171c35;         /* Azul escuro igual ao toast do print */
    
    /* Fonts */
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(44, 28, 27, 0.04);
    --shadow-md: 0 8px 24px rgba(44, 28, 27, 0.06);
    --shadow-lg: 0 16px 40px rgba(44, 28, 27, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    overflow-x: hidden;
    max-width: 100%;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    color: var(--color-text-main);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--color-sidebar-bg);
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    /* Fixo: sempre visível e sempre cobre a altura total da tela */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 24px;
    padding: 0 8px;
}

.logo-img {
    width: 100%;
    max-height: 56px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

/* Simulator Switcher */
.simulator-box {
    background-color: var(--color-sidebar-hover);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.simulator-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.custom-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.simulator-select {
    width: 100%;
    background-color: var(--color-sidebar-active);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px 30px 8px 12px;
    font-size: 13px;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

.simulator-select:focus {
    border-color: var(--color-primary);
}

.select-arrow {
    position: absolute;
    right: 10px;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

/* Sidebar Navigation Items */
.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    text-align: left;
    position: relative;
}

.nav-item:hover {
    background-color: var(--color-sidebar-hover);
    color: #ffffff;
}

.nav-item.active {
    background-color: var(--color-sidebar-active);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    stroke-width: 2px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background-color: var(--color-danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Sidebar Footer (Active User Profile) */
.sidebar-footer {
    display: flex;
    align-items: center;
    padding: 16px 8px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.active-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background-color: var(--color-primary);
    color: var(--color-sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(194, 230, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-size: cover;
    background-position: center;
}

.active-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
}

.active-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.active-user-role {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.reset-state-btn {
    color: rgba(255, 255, 255, 0.4);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.reset-state-btn:hover {
    color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Main Area Container */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 30px 40px;
    overflow-y: auto;
    /* Compensa o sidebar fixo de 260px */
    margin-left: 260px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

#view-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Coins Balance Widget */
.coins-display {
    display: flex;
    align-items: center;
    background-color: var(--color-sidebar-bg); /* Marrom do sidebar */
    color: white;
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.coins-display:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--color-sidebar-hover);
}

.coins-display:hover .coins-chevron {
    opacity: 0.9;
    transform: translateX(2px);
}

.coins-display-inner {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    margin-right: 2px;
}

.coins-chevron {
    opacity: 0.4;
    margin-left: 2px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.coin-icon {
    width: 28px;
    height: 28px;
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.coins-amount {
    font-size: 16px;
    color: var(--color-primary); /* Verde-limão */
    margin-right: 4px;
    font-weight: 700;
}

.coins-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

/* Cart Button */
.cart-btn {
    width: 40px;
    height: 40px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition-fast);
}

.cart-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cart-btn svg {
    width: 18px;
    height: 18px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--color-sidebar-bg);
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-card-bg);
}

/* View Injection Container */
.view-container {
    flex-grow: 1;
    min-height: 400px;
}

/* Footer Section */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    font-size: 12px;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.powered-accent {
    font-weight: 600;
    color: var(--color-sidebar-bg);
}

/* ==========================================================================
   Shared Components / Utility Classes
   ========================================================================== */
.card {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-sidebar-bg);
    border: 1px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(194, 230, 0, 0.3);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: var(--color-bg);
    border-color: var(--color-text-muted);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--color-sidebar-bg);
    border: 2px solid var(--color-sidebar-bg);
}

.btn-outline-primary:hover {
    background-color: var(--color-sidebar-bg);
    color: white;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.badge-neutral {
    background-color: var(--color-bg);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.badge-accent {
    background-color: var(--color-primary-light);
    color: var(--color-sidebar-bg);
}

/* CSS Page Animations */
.fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   View 1: Dashboard (Início)
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--color-sidebar-bg), #5c3b3a);
    color: white;
    border-radius: var(--radius-lg);
    padding: 30px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.welcome-banner::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 200px;
    height: 200px;
    background-color: var(--color-primary);
    opacity: 0.05;
    border-radius: var(--radius-full);
}

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    max-width: 500px;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--color-primary-light);
    color: var(--color-sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.5px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
}

.section-card-title {
    font-size: 18px;
    font-weight: 700;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(235, 231, 223, 0.5);
}

.dashboard-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-title-desc {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-weight: 600;
    font-size: 14px;
}

.item-desc {
    font-size: 12px;
    color: var(--color-text-muted);
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.balance-card {
    background: linear-gradient(135deg, var(--color-sidebar-bg) 0%, #251615 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(194, 230, 0, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.balance-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 600;
}

.balance-card-value {
    font-size: 40px;
    font-family: var(--font-headings);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.balance-card-value .coin {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

/* ==========================================================================
   View 2: Metas (Goals)
   ========================================================================== */
.view-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-top: -24px;
    margin-bottom: 24px;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.goal-card {
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--color-border);
}

.goal-card.completed-unclaimed {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(194, 230, 0, 0.15);
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.goal-card-tag {
    font-size: 10px;
    background-color: var(--color-bg);
    color: var(--color-text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
}

.goal-card-tag.new {
    background-color: var(--color-sidebar-bg);
    color: var(--color-primary);
}

.goal-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    min-height: 48px;
    line-height: 1.3;
}

.goal-metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.goal-metrics-label {
    text-transform: uppercase;
}

.goal-metrics-values {
    color: var(--color-text-main);
    font-weight: 700;
}

.goal-progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background-color: var(--color-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.goal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-sidebar-bg), var(--color-sidebar-hover));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.goal-card.completed-unclaimed .goal-progress-bar,
.goal-card.claimed .goal-progress-bar {
    background: var(--color-primary);
}

.goal-progress-percent {
    position: absolute;
    right: 0;
    top: -24px;
    font-size: 11px;
    font-weight: 700;
}

.goal-reward-box {
    margin-top: auto;
    background-color: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed var(--color-border);
}

.goal-reward-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-text-muted);
}

.goal-reward-value {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-sidebar-bg);
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-reward-value .coin {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.goal-action-btn {
    width: 100%;
    margin-top: 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
}

.goal-time-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--color-text-muted);
}

.goal-time-left svg {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   View 3: Missões (Missions)
   ========================================================================== */
.view-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
}

.tab-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.tab-btn:hover {
    border-color: var(--color-sidebar-bg);
    color: var(--color-text-main);
}

.tab-btn.active {
    background-color: var(--color-sidebar-bg);
    color: var(--color-primary);
    border-color: var(--color-sidebar-bg);
    box-shadow: var(--shadow-sm);
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* Card corretor — banner rectangular + content */
.mission-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 0;
    position: relative;
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.mission-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.mission-img-container {
    width: 100%;
    height: 148px;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    background-color: var(--color-bg);
    flex-shrink: 0;
}

.mission-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mission-card:hover .mission-img {
    transform: scale(1.04);
}

.mission-content {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.mission-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.mission-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    flex: 1;
    margin: 0;
}

.mission-reward {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 800;
    color: var(--color-primary);
    background: var(--color-sidebar-bg);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mission-reward .coin {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    display: inline-block;
}

.mission-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.45;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.mission-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    z-index: 2;
}

.mission-card.completed {
    opacity: 0.75;
}

/* Admin missions list */
.admin-missao-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    margin-bottom: 6px;
}

.admin-missao-item:hover {
    background: var(--color-bg);
}

.admin-missao-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.admin-missao-info {
    flex: 1;
    min-width: 0;
}

.admin-missao-titulo {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.admin-missao-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-missao-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.admin-missao-recompensa {
    background: var(--color-sidebar-bg);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-missao-etapas {
    background: var(--color-bg);
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-missao-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mission-reward-badge {
    display: none;
}

.mission-action-btn {
    width: 100%;
    margin-top: auto;
}

.mission-completed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

.mission-completed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(251, 250, 247, 0.9);
    z-index: 2;
    border-radius: var(--radius-lg);
    gap: 10px;
}

.mission-completed-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: var(--color-success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.mission-completed-text {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text-main);
}

/* ==========================================================================
   Carrinho
   ========================================================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

.cart-items-list {
    padding: 4px 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

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

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item-title {
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-main);
}

.cart-item-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.cart-item-badge {
    font-size: 11px;
    background: var(--color-bg);
    color: var(--color-text-muted);
    padding: 1px 8px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.cart-item-badge-danger { background: #f8d7da; color: #721c24; border-color: #f5c6cb; font-weight: 600; }
.cart-item-badge-warn   { background: #fff3cd; color: #856404; border-color: #ffc107; font-weight: 600; }

.cart-item-price {
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--color-text-main);
}

.cart-item-insuficiente {
    font-size: 10px;
    color: var(--color-danger);
    font-weight: 600;
    margin-left: 6px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.cart-item-btn-resgatar  { padding: 6px 14px; font-size: 12px; white-space: nowrap; }
.cart-item-btn-remover   { padding: 5px 10px; font-size: 11px; }
.cart-item-btn-disabled  { opacity: 0.45; cursor: not-allowed; }
.cart-item-btn-esgotado  { padding: 6px 12px; font-size: 12px; opacity: 0.4; cursor: not-allowed; background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Painel de resumo */
.cart-summary-sticky { position: sticky; top: 20px; }
.cart-summary-box    { padding: 20px 22px; }

.cart-summary-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-sidebar-bg);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.cart-summary-val { font-weight: 700; color: var(--color-text-main); }

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
    font-weight: 800;
    color: var(--color-text-main);
}

.cart-summary-alerta {
    font-size: 12px;
    color: var(--color-danger);
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
}

.cart-summary-btn-main {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
}

.cart-summary-btn-sec {
    width: 100%;
    margin-top: 8px;
    font-size: 13px;
}

/* ==========================================================================
   View 4: Carteira (Wallet / Statement)
   ========================================================================== */
.wallet-cards-row {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.wallet-card-visual {
    background: linear-gradient(135deg, var(--color-sidebar-bg) 0%, #201312 100%);
    border-radius: var(--radius-lg);
    padding: 30px;
    color: white;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.wallet-card-visual::before {
    content: '';
    position: absolute;
    right: -100px;
    bottom: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(194, 230, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

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

.wallet-card-brand {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
}

.wallet-card-chip {
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #e3c45b 0%, #b89218 100%);
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4);
}

.wallet-card-middle {
    display: flex;
    flex-direction: column;
}

.wallet-card-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.wallet-card-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-headings);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-card-number .coin {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.wallet-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 11px;
}

.wallet-card-holder-label {
    text-transform: uppercase;
    font-size: 8px;
    color: rgba(255,255,255,0.4);
}

.wallet-card-holder-name {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Quick Summary Box */
.wallet-quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.wallet-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wallet-stat-icon-gain {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-stat-icon-spend {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Statement section */
.statement-card {
    width: 100%;
}

.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.search-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 300px;
    width: 100%;
}

.search-box-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 16px 10px 40px;
    font-size: 13px;
    background-color: var(--color-bg);
    outline: none;
    transition: var(--transition-fast);
}

.search-box-input:focus {
    border-color: var(--color-sidebar-bg);
    background-color: white;
}

.search-box-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
}

/* Statement Table */
.statement-table-wrapper {
    overflow-x: auto;
}

.statement-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.statement-table th {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 14px 16px;
    border-bottom: 2px solid var(--color-border);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.statement-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

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

.statement-table tbody tr {
    transition: var(--transition-fast);
}

.statement-table tbody tr:hover {
    background-color: rgba(249, 248, 244, 0.6);
}

.col-date {
    white-space: nowrap;
}

.col-description {
    font-weight: 500;
}

/* ── Ações com dropdown (Painel Gestor) ── */
.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.dropdown-wrap {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    padding: 5px 11px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dropdown-trigger:hover {
    background: var(--color-border);
    color: var(--color-text-main);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 1050;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(44, 28, 27, 0.12);
    min-width: 188px;
    padding: 4px 0;
    white-space: nowrap;
}

.dropdown-menu.open {
    display: block;
    animation: dropdownIn 0.12s ease;
}

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

.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    background: none;
    border: none;
    color: var(--color-text-main);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dropdown-menu-item.danger {
    color: var(--color-danger);
}

.dropdown-menu-item.danger:hover {
    background: rgba(220, 53, 69, 0.07);
}

.dropdown-menu-item.is-disabled {
    color: var(--color-text-muted);
    cursor: default;
    pointer-events: none;
    font-style: italic;
    font-size: 12px;
}

.dropdown-sep {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}

.col-coins {
    font-weight: 700;
    text-align: right;
    font-size: 14px;
    white-space: nowrap;
}

.coins-plus {
    color: var(--color-success);
}

.coins-minus {
    color: var(--color-text-main);
}

.col-category {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
}

.col-category svg {
    width: 14px;
    height: 14px;
}

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

/* ==========================================================================
   View 5: Experiências (Loja / Catalog)
   ========================================================================== */
.catalog-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.catalog-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    max-width: 100%;
}

.category-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-btn:hover {
    border-color: var(--color-sidebar-bg);
    color: var(--color-text-main);
}

.category-btn.active {
    background-color: var(--color-primary);
    color: var(--color-sidebar-bg);
    border-color: var(--color-primary);
    font-weight: 700;
}

.catalog-search-wrapper {
    max-width: 250px;
    width: 100%;
}

.catalog-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
    color: var(--color-sidebar-bg);
}

/* ==========================================================================
   Tela de Prêmios — cards e filtros
   ========================================================================== */

/* Imagem do card */
.exp-card-img {
    position: relative;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg);
}

/* Corpo do card */
.exp-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    min-width: 0;
}

.exp-card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.exp-card-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Rodapé do card: preço + botão lado a lado no desktop */
.exp-card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.exp-card-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.exp-card-warn {
    font-size: 10px;
    color: var(--color-danger);
    font-weight: 600;
    display: block;
    margin-top: 1px;
    font-size: 10px;
}

.exp-card-btn {
    font-size: 12px;
    padding: 7px 12px;
    white-space: nowrap;
    border-radius: var(--radius-full);
    font-weight: 700;
    flex-shrink: 0;
}

/* Filtros da tela de Prêmios */
.exp-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.exp-filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.exp-search-wrap {
    position: relative;
    flex: 1;
}

.exp-search-wrap svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.exp-search-wrap input {
    width: 100%;
    padding: 8px 12px 8px 30px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 13px;
    background: var(--color-card-bg);
    color: var(--color-text-main);
    outline: none;
    font-family: var(--font-body);
}

.exp-search-wrap input:focus {
    border-color: var(--color-sidebar-bg);
}

.exp-sort-select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 13px;
    background: var(--color-card-bg);
    color: var(--color-text-main);
    cursor: pointer;
    outline: none;
    font-family: var(--font-body);
    white-space: nowrap;
}

.exp-cats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exp-cat-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: var(--font-body);
}

.exp-cat-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-sidebar-bg);
}

.exp-cat-btn:hover:not(.active) {
    border-color: var(--color-sidebar-bg);
}

.experiences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
}

.experience-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.experience-img-box {
    width: 100%;
    height: 150px;
    background-color: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.experience-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.experience-card:hover .experience-img-box img {
    transform: scale(1.05);
}

.experience-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    z-index: 2;
}

.experience-favorite-btn:hover {
    color: #e63946;
}

.experience-favorite-btn.active {
    color: #e63946;
}

.experience-favorite-btn svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.experience-favorite-btn:active svg {
    transform: scale(1.3);
}

.experience-label-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: var(--color-sidebar-bg);
    color: var(--color-primary);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
    text-transform: uppercase;
}

.experience-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.experience-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.experience-footer-row {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.experience-price-box {
    display: flex;
    flex-direction: column;
}

.experience-price-label {
    font-size: 9px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.experience-price-val {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 15px;
    color: var(--color-sidebar-bg);
    display: flex;
    align-items: center;
    gap: 4px;
}

.experience-price-val .coin {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.experience-redeem-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   View 6: Perfil (Minha Conta)
   ========================================================================== */
.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-form-section {
    margin-bottom: 10px;
}

.profile-section-title-form {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-sidebar-bg);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.avatar-preview-box {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: var(--transition-fast);
}

.avatar-preview-box:hover {
    border-color: var(--color-primary);
}

.avatar-preview-box svg {
    width: 24px;
    height: 24px;
    color: var(--color-text-muted);
}

.avatar-upload-btn-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.avatar-upload-instructions {
    font-size: 11px;
    color: var(--color-text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }

.form-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--color-text-main);
    background-color: var(--color-card-bg);
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
    border-color: var(--color-sidebar-bg);
    box-shadow: 0 0 0 2px rgba(61, 37, 36, 0.05);
}

.form-input::placeholder {
    color: #c5beb7;
}

.form-input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-password-wrapper .form-input {
    padding-right: 46px;
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ==========================================================================
   Perfil — novo layout
   ========================================================================== */
.perfil-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    margin-bottom: 20px;
}

.perfil-hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-full);
    background: var(--color-sidebar-bg);
    color: var(--color-primary);
    font-size: 30px;
    font-weight: 800;
    font-family: var(--font-headings);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid var(--color-border);
    transition: var(--transition-fast);
}

.perfil-hero-avatar:hover {
    border-color: var(--color-primary);
}

.perfil-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perfil-hero-name {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-headings);
    color: var(--color-sidebar-bg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.perfil-hero-role {
    font-size: 13px;
    color: var(--color-text-muted);
}

.perfil-hero-email {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.perfil-hero-coins {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 4px;
    width: fit-content;
}

.perfil-hero-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

.perfil-photo-btn {
    font-size: 12px;
    padding: 7px 14px;
}

.perfil-logout-btn {
    font-size: 12px;
    padding: 7px 14px;
    background: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.perfil-logout-btn:hover {
    background: var(--color-danger);
    color: #fff;
}

.perfil-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perfil-section-card {
    padding: 24px;
}

.perfil-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.perfil-section-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-sidebar-bg);
    flex-shrink: 0;
}

.perfil-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-sidebar-bg);
    margin: 0;
}

.perfil-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0f7ff;
    border: 1px solid #b6d4f5;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 13px;
    color: #0969da;
    line-height: 1.5;
}

.perfil-reset-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.perfil-reset-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.perfil-reset-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.perfil-reset-text p {
    margin: 0;
}

.perfil-reset-text p:first-child {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 3px;
}

.perfil-reset-text p:last-child {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.perfil-reset-success {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fff4;
    border: 1px solid #c3e6cb;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #155724;
    width: 100%;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(44, 28, 27, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    padding: 16px;
    justify-content: center;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--color-card-bg);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    position: relative;
    transform: translateY(30px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-text-main);
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--color-bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Modal specific components */
.redeem-confirm-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.redeem-confirm-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.redeem-confirm-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.redeem-confirm-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.redeem-confirm-price {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-sidebar-bg);
    display: flex;
    align-items: center;
    gap: 6px;
}

.redeem-confirm-price .coin {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.redeem-balance-check {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.redeem-balance-row {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
}

.redeem-balance-row.final {
    font-weight: 700;
    color: var(--color-text-main);
    font-size: 13px;
    margin-top: 4px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 110;
    pointer-events: none;
}

.toast {
    background-color: var(--color-toast-bg); /* Azul escuro do print */
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm); /* Mais retangular, como no print */
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 250px;
}

.toast.removing {
    animation: toastFadeOut 0.2s ease forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
}

/* ==========================================================================
   Coin Animation Particles Layer
   ========================================================================== */
.coins-animation-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 200;
}

.flying-coin {
    position: absolute;
    width: 18px;
    height: 18px;
    background-image: url('images/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: transparent !important;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px var(--color-primary-glow);
    z-index: 201;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .wallet-cards-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wallet-admin-stats {
        grid-template-columns: 1fr !important;
    }
}

/* primeiro bloco mobile removido — ver bloco unificado abaixo */

/* ==========================================================================
   Mobile Bottom Navigation — redesign
   ========================================================================== */
#mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 400;
    /* fundo levemente mais escuro que o sidebar para profundidade */
    background: #251716;
    /* linha verde-limão solicitada pelo usuário */
    border-top: 3px solid var(--color-primary);
    padding-bottom: env(safe-area-inset-bottom);
}

.bnav-inner {
    display: flex;
    height: 60px;
    align-items: stretch;
}

.bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.2px;
    cursor: pointer;
    padding: 8px 4px 6px;
    position: relative;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.bnav-item svg {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    stroke-width: 1.8px;
    transition: transform 0.15s;
}

/* Feedback tátil: leve retração ao toque */
.bnav-item:active svg {
    transform: scale(0.86);
}

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

/* Indicador visual: barra verde acima do ícone ativo */
.bnav-item.active::before {
    content: '';
    position: absolute;
    top: -3px;          /* sobe sobre o border-top do nav */
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: #fff;   /* marca branca sobre a linha verde = destaque */
    border-radius: 0 0 4px 4px;
}

/* Avatar com iniciais do usuário no botão Conta do bottom nav */
.bnav-avatar-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-sidebar-bg);
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-headings);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: var(--transition-fast);
    line-height: 1;
}

.bnav-item.active .bnav-avatar-circle {
    border-color: #fff;
    background: rgba(194, 230, 0, 0.18);
    color: var(--color-primary);
}

.bnav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 22px);
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    /* borda escura para separar do ícone */
    border: 1.5px solid #251716;
}

/* ==========================================================================
   App Shell Mobile (≤ 768px) — bloco único
   ========================================================================== */

/* Logo da marca no header (oculto no desktop, visível no mobile) */
.header-brand-logo {
    display: none;
    width: 28px;
    height: 28px;
    background: url('images/coin.png') center / contain no-repeat;
    flex-shrink: 0;
    margin-right: 8px;
    border-radius: 7px;
}

@media (max-width: 768px) {
    /* Layout raiz */
    .app-container {
        flex-direction: column;
        min-height: 100dvh;
    }

    /* Esconde sidebar, exibe nav inferior */
    .sidebar {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
    #mobile-bottom-nav {
        display: block !important;
    }

    /* ── Header fixo no topo ── */
    .app-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        background: var(--color-card-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 1px 0 var(--color-border);
        margin-bottom: 0;
        /* empurra conteúdo do header abaixo do notch/Dynamic Island */
        padding: env(safe-area-inset-top) 16px 0;
        height: calc(56px + env(safe-area-inset-top));
        align-items: flex-end;
        padding-bottom: 10px;
    }

    /* Exibe logo no header mobile */
    .header-brand-logo {
        display: block;
    }

    .header-title-container {
        display: flex;
        align-items: center;
        min-width: 0;
        flex: 1;
        margin-right: 12px;
    }

    #view-title {
        font-size: 17px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Coins no mobile: mostra "Carteira" em duas linhas + chevron */
    .coins-display {
        padding: 5px 10px 5px 5px;
        gap: 0;
    }
    .coins-display-inner {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
    }
    .coin-icon {
        width: 24px;
        height: 24px;
        margin-right: 7px;
    }
    .coins-amount {
        font-size: 13px;
        font-weight: 800;
    }
    .coins-label {
        display: block;
        font-size: 9px;
        color: rgba(255, 255, 255, 0.55);
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-right: 0;
    }
    .coins-chevron {
        width: 10px;
        height: 10px;
        opacity: 0.5;
    }

    /* ── Área principal ── */
    .main-content {
        /* top: altura do header fixo; bottom: altura da nav inferior */
        padding: calc(56px + env(safe-area-inset-top) + 16px) 16px
                 calc(70px + env(safe-area-inset-bottom)) !important;
        min-height: unset;
    }

    /* Oculta footer desktop (nav inferior cumpre esse papel) */
    .app-footer {
        display: none !important;
    }

    /* Grids colapsam para 1 coluna */
    .form-grid {
        grid-template-columns: 1fr;
    }
    .col-span-1, .col-span-2, .col-span-3, .col-span-4 {
        grid-column: span 1;
    }

    /* ── Cards menores no mobile ── */
    .card { padding: 16px; }

    /* ── Tela Início ── */
    .dashboard-grid { gap: 16px; }
    .dashboard-main,
    .dashboard-sidebar { gap: 16px; }

    .welcome-banner {
        padding: 20px 20px;
        border-radius: var(--radius-md);
    }
    .welcome-title { font-size: 20px; margin-bottom: 6px; }
    .welcome-subtitle { font-size: 13px; }

    .stats-summary-grid { gap: 8px; grid-template-columns: repeat(3, 1fr); }
    .stat-box { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 6px !important; }
    .stat-icon-wrapper { width: 32px; height: 32px; flex-shrink: 0; }
    .stat-value { font-size: 16px; }
    .stat-label { font-size: 10px; line-height: 1.2; }

    .section-card-title { font-size: 15px; }
    .section-card-header { margin-bottom: 14px; padding-bottom: 10px; }

    .balance-card-value { font-size: 32px; margin-bottom: 12px; }

    /* ── Metas + Missões ── */
    /* Remove margem negativa que puxa conteúdo atrás do header fixo */
    .view-desc {
        margin-top: 0;
        margin-bottom: 16px;
        font-size: 13px;
    }

    /* Goals grid: 1 coluna, espaçamento compacto */
    .goals-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Goal card: remove altura mínima do título (desnecessária em 1 coluna) */
    .goal-card-title {
        min-height: auto;
        font-size: 15px;
        margin-bottom: 12px;
    }
    .goal-card-header {
        margin-bottom: 12px;
    }

    /* Missions grid: 1 coluna */
    .missions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Reduz altura da imagem nas missões para não ocupar a tela toda */
    .mission-img-container {
        height: 120px;
    }

    /* ── Tela Prêmios ── */
    /* Grade: 2 colunas compactas */
    .experiences-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Imagem menor no mobile */
    .exp-card-img { height: 120px; }

    /* Corpo com padding menor */
    .exp-card-body { padding: 10px 10px 12px; gap: 4px; }

    /* Título menor */
    .exp-card-title { font-size: 13px; }
    .exp-card-desc { display: none; } /* esconde descrição em 2 colunas — pouco espaço */

    /* Preço menor */
    .exp-card-price { font-size: 14px; }

    /* Rodapé: empilha verticalmente no mobile */
    .exp-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    /* Botão ocupa largura total */
    .exp-card-btn {
        width: 100%;
        text-align: center;
        padding: 8px 6px;
        font-size: 12px;
    }

    /* Sort compacto */
    .exp-sort-select {
        font-size: 12px;
        padding: 7px 10px;
    }

    /* Pills: quebra em linhas, centralizado */
    .exp-cats-row {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    /* ── Carrinho ── */
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    /* Resumo vai embaixo dos itens no mobile */
    .cart-summary-sticky { position: static; order: 2; }
    .cart-items-list { order: 1; }

    .cart-item { gap: 12px; padding: 14px 0; }
    .cart-item-img { width: 56px; height: 56px; border-radius: 8px; }
    .cart-item-title {
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 13px;
    }
    .cart-item-price { font-size: 14px; }
    /* Botões lado a lado no mobile */
    .cart-item-actions { flex-direction: row; }
    .cart-item-btn-resgatar { padding: 7px 12px; font-size: 12px; }
    .cart-item-btn-remover  { padding: 7px 10px; font-size: 12px; }
    .cart-summary-box { padding: 16px; }
    .cart-summary-btn-main { padding: 13px; font-size: 15px; }

    /* ── Carteira ── */
    .wallet-card-visual {
        padding: 20px;
        height: auto;
        min-height: 155px;
    }
    .wallet-card-brand { font-size: 15px; }
    .wallet-card-number { font-size: 22px; }
    .wallet-quick-stats { gap: 10px; }

    /* Header do extrato: busca vai para baixo do título */
    .statement-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .search-box-wrapper { max-width: 100%; }

    /* Tabela: esconde colunas Categoria e Status no mobile (pouco espaço) */
    .statement-table th:nth-child(3),
    .statement-table td:nth-child(3),
    .statement-table th:nth-child(4),
    .statement-table td:nth-child(4) { display: none; }
    .statement-table th,
    .statement-table td { padding: 10px 8px; font-size: 12px; }

    /* Paginação do extrato: empilha verticalmente */
    .statement-pagination {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        text-align: center;
    }
    .statement-pagination button { width: 100%; }

    /* Admin — grid de resumo financeiro */
    .wallet-admin-summary-grid { grid-template-columns: 1fr !important; }

    /* ── Perfil — botão reset senha ── */
    .perfil-reset-box {
        flex-direction: column;
        align-items: stretch;
    }
    .perfil-reset-box button {
        width: 100%;
    }

    /* ── Perfil ── */
    .perfil-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }
    .perfil-hero-side {
        flex-direction: row;
        width: 100%;
        align-items: center;
    }
    .perfil-logout-btn { margin-left: auto; }
    .perfil-hero-name { font-size: 18px; white-space: normal; }
    .perfil-section-card { padding: 16px; }
    .profile-actions {
        justify-content: stretch;
    }
    .profile-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* ── Painel Gestor (Admin) ── */
    /* Transforma tabela de corretores em cards verticais */
    .admin-corretores-table,
    .admin-corretores-table tbody { display: block; }
    .admin-corretores-table thead { display: none; }
    .admin-corretores-table tbody tr {
        display: flex;
        flex-direction: column;
        padding: 14px 0;
        border-bottom: 1px solid var(--color-border);
        gap: 6px;
    }
    .admin-corretores-table tbody tr:last-child { border-bottom: none; }
    .admin-corretores-table tbody td {
        display: block;
        padding: 0;
        border: none;
        font-size: 13px;
    }
    /* Esconde Cargo e E-mail no mobile — aparecem no card de detalhe */
    .admin-corretores-table tbody td:nth-child(2),
    .admin-corretores-table tbody td:nth-child(3) { display: none; }
    /* Saldo alinha à esquerda */
    .admin-corretores-table tbody td:nth-child(4) { text-align: left !important; font-size: 14px; }
    /* Botões de ação: alinha à esquerda */
    .admin-corretores-table tbody td:nth-child(5) { text-align: left !important; }
    .admin-corretores-table tbody td:nth-child(5) .table-actions { justify-content: flex-start !important; }
    /* Dropdown abre para cima no mobile para não sair da tela */
    .admin-corretores-table .dropdown-menu {
        right: auto;
        left: 0;
        top: auto;
        bottom: calc(100% + 5px);
    }
}

/* ==========================================================================
   Supabase Auth / Login Overlay
   ========================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg);
    display: none; /* Ativado dinamicamente via JS adicionando .needs-auth no body */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

body.needs-auth .login-overlay {
    display: flex;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    background-color: var(--color-card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

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

.login-logo h3 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--color-sidebar-bg);
    margin-top: 10px;
}

.login-logo p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   Estado de carregamento dos botões
   ========================================================================== */
.btn-loading {
    position: relative !important;
    color: transparent !important;
    pointer-events: none !important;
    opacity: 0.85 !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid rgba(61, 37, 36, 0.15) !important;
    border-top-color: #3d2524 !important;
    border-radius: 50%;
    animation: btn-spinner 0.6s linear infinite;
}

@keyframes btn-spinner {
    to {
        transform: rotate(360deg);
    }
}
