/* =========================================
   PLENUM UI - iOS/Glassmorphism Theme (Light)
   ========================================= */

:root {
    --primary-color: #007AFF;
    --primary-hover: #0056b3;
    --success-color: #34C759;
    --danger-color: #FF3B30;
    --warning-color: #FF9500;
    
    /* Fundo geral */
    --bg-gradient-start: #F2F2F7;
    --bg-gradient-end: #E5E5EA;
    
    /* Vidro (Glass Settings) */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    --glass-blur: blur(20px);
    
    /* Tipografia e Cores */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --text-main: #1C1C1E;
    --text-muted: #8E8E93;
    
    /* Dimensões */
    --card-radius: 22px;
    --btn-radius: 50rem;
    --header-height: 70px;
    --bottom-nav-height: 80px;
}

/* === GERAL === */
body {
    background: linear-gradient(135deg, #eef2f3 0%, #e6eff5 100%);
    background-attachment: fixed;
    font-family: var(--font-stack);
    color: var(--text-main);
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.text-muted { color: var(--text-muted) !important; font-weight: 500; }
a { text-decoration: none !important; } /* Remove sublinhados globais */

/* === NAVBAR DESKTOP (Light Glass) === */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.85) !important; /* Branco Translúcido */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: var(--header-height);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* EFEITO DEGRADÊ NO NOME PLENUM */
.navbar-brand span {
    /* Degradê do Azul Escuro (Login) para o Azul Vibrante (Botões) */
    background: linear-gradient(135deg, #1e3c72 0%, #007AFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Garante que o degradê funcione */
    display: inline-block;
    font-weight: 800; /* Deixa bem grosso para o degradê aparecer bem */
}

/* Ajuste fino para o ícone não pegar o degradê */
.navbar-brand img {
    opacity: 0.9;
}

/* Links do Menu */
.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted) !important; /* Cinza */
    transition: all 0.3s ease;
    padding: 8px 16px !important;
    border-radius: var(--btn-radius);
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(0, 122, 255, 0.08);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(0, 122, 255, 0.12);
    font-weight: 700;
}

/* Pesquisa Global (Pill) */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container .search-input {
    background-color: #F2F2F7; /* Cinza Apple Input */
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    color: var(--text-main);
    padding: 10px 20px 10px 45px; /* Padding extra na esquerda para o ícone */
    font-size: 0.9rem;
    transition: all 0.3s;
    width: 100%;
}

.search-container .search-input:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
    outline: none;
}

/* Correção da Lupa */
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none; /* Permite clicar através do ícone */
    font-size: 0.9rem;
    z-index: 10;
}

/* Ícones de Ação Mobile (Header) */
.mobile-action-btn {
    font-size: 1.2rem;
    color: var(--text-main);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.mobile-action-btn:active {
    background-color: rgba(0,0,0,0.05);
}

/* === CARDS === */
.card-dashboard, .card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card-dashboard:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.card h6, .card h5 {
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 15px;
}

/* === BOTÕES === */
.btn {
    border-radius: var(--btn-radius);
    font-weight: 700;
    padding: 10px 24px;
    border: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.btn-primary {
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.btn-logout-desktop {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--danger-color);
}
.btn-logout-desktop:hover {
    background: var(--danger-color);
    color: white;
    border-color: transparent;
}

/* === MOBILE BOTTOM NAV (Dock) === */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}

.nav-item-mobile {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #B0B0B5;
    text-decoration: none !important; /* Remove traço */
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-item-mobile i {
    font-size: 1.5rem;
    margin-bottom: 4px;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s;
}

.nav-item-mobile.active { color: var(--primary-color); }
.nav-item-mobile.active i {
    background-color: rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
}

/* FAB - Botão Flutuante */
.nav-item-fab {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007AFF 0%, #005ecb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.4);
    transform: translateY(-25px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 4px solid rgba(255,255,255,0.8);
    text-decoration: none !important; /* GARANTE QUE NÃO TENHA TRAÇO */
}

.nav-item-fab:active { transform: translateY(-20px) scale(0.95); }
.nav-item-fab:hover { color: white; } /* Garante que ícone fique branco */

/* === RESPONSIVIDADE === */
@media (max-width: 991.98px) {
    .navbar-desktop-links, .search-container-desktop { display: none !important; }
    .mobile-bottom-nav { display: flex; justify-content: space-around; }
    
    body { padding-top: 60px; }
    .navbar-brand { margin: 0 auto; left: 50%; transform: translateX(-50%); position: absolute; }
    
    .mobile-header-actions {
        display: flex;
        align-items: center;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (min-width: 992px) {
    .mobile-bottom-nav { display: none !important; }
    .mobile-header-actions { display: none; }
}
