@import "../node_modules/@fortawesome/fontawesome-free/css/all.min.css";
/* --- DESIGN TOKENS (Variáveis) --- */
:root {
    /* Colors */
    --primary-navy: #1a202c;
    --accent-gold: #c5a059;
    --dusty-gold: rgba(197, 160, 89, 0.2);
    --bg-blue: rgba(26, 32, 44, 0.05);
    --error-red: #e53e3e;
    --success-green: #38a169;

    /* Glassmorphism */
    --white: rgba(255, 255, 255);
    --glass: rgba(255, 255, 255, 0.75);
    --glass-stroke: rgba(255, 255, 255, 0.4);

    /* Shadows & Elevation */
    --shadow-lux: 0 40px 100px rgba(0, 0, 0, 0.08);
    --shadow-btn: 0 15px 30px rgba(26, 32, 44, 0.2);

    /* Transitions & Animations */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-main: "Plus Jakarta Sans", sans-serif;
    --font-heading: "Outfit", sans-serif;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    min-height: 100vh;
    background: var(--white);
    color: var(--primary-navy);

    /* Adicione estas 3 linhas abaixo: */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* --- BACKGROUND ANIMATION --- */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.6;
    background-image:
        radial-gradient(at 0% 0%, var(--dusty-gold) 0px, transparent 50%),
        radial-gradient(at 100% 100%, var(--bg-blue) 0px, transparent 50%);
    animation: meshRotate 20s infinite alternate linear;
}

@keyframes meshRotate {
    from {
        transform: scale(1) rotate(0deg);
    }
    to {
        transform: scale(1.2) rotate(5deg);
    }
}

/* --- TYPOGRAPHY --- */
h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2rem;
    color: var(--primary-navy);
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.9rem;
    color: #718096;
}

.brand-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: -1px;
    font-size: 1.4rem;
    color: var(--primary-navy);
}

/* 1. CABEÇALHO DO GRUPO (O container que envolve o Label e o Botão) */
.form-group-header {
    display: flex;
    justify-content: space-between; /* Joga o label para um lado e o botão para o outro */
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

/* 2. O LABEL DENTRO DO GRUPO (Igualando aos campos de fora) */
.form-group-header label {
    margin-bottom: 0 !important; /* Remove margem inferior para alinhar com o botão */
    font-size: 14px;
    font-weight: 600;
    color: #374151; /* Cor padrão de labels do sistema */
}

/* 3. ESTILO DO BOTÃO DE ADICIONAR (Delicado e Profissional) */
.btn-add-group {
    background-color: #f0f9ff; /* Azul bem clarinho */
    color: #0369a1; /* Azul forte para o texto */
    border: 1px solid #bae6fd;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-add-group:hover {
    background-color: #e0f2fe;
    border-color: #7dd3fc;
    color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-add-group:active {
    transform: translateY(0);
}

/* 4. CONTAINER DOS ITENS (Onde ficam os cards) */
[id^="group_container_"] {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 5. CARD DO ITEM (Refinado) */
.group-row-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--white)fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    position: relative;
    transition: border-color 0.2s;
}

.group-row-item:hover {
    border-color: #cbd5e1;
}

/* Ajuste dos Labels dentro do card para não gritarem mais que o título principal */
.group-row-item label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
}

/* 6. BOTÃO DE REMOVER (Xzinho elegante no canto do card) */
.btn-remove-row {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    color: #94a3b8;
    border: none;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.btn-remove-row:hover {
    color: #ef4444;
}

/* --- FORMS & INPUTS --- */
.label-lux {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 8px;
    display: block;
}

input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0);
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--primary-navy);
    transition: all 0.3s var(--ease-out);
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0);
    border: none;
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15);
    transform: translateY(-2px);
}

/* --- BUTTONS --- */
.btn-lux {
    width: 100%;
    padding: 18px;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-lux:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-btn);
    filter: brightness(1.1);
}

.btn-lux:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-lux.btn-gold {
    background: var(--accent-gold);
}

/* LINKS */
.link-lux {
    background: none;
    border: none;
    color: var(--primary-navy);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.link-lux:hover {
    color: var(--accent-gold);
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000; /* Acima do Modal/Sheet */
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Base do Toast */
.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 280px;
    max-width: 400px;
    border-left: 5px solid var(--accent-gold);
    animation: slideInRight 0.5s var(--ease-out) forwards;
}

.toast.success {
    border-left-color: var(--success-green);
}
.toast.error {
    border-left-color: var(--error-red);
}
.toast.info {
    border-left-color: var(--primary-navy);
}

.toast-title {
    font-weight: 800;
    font-family: "Outfit";
    font-size: 14px;
    color: var(--primary-navy);
}
.toast-msg {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 500;
}

.toast.exiting {
    animation: slideExitRight 0.4s var(--ease-out) forwards;
}

/* Animações */
@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideExitRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* --- LOADING SPINNER --- */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- UTILITY CLASSES --- */
.text-center {
    text-align: center;
}
.mt-40 {
    margin-top: 40px;
}
.mb-30 {
    margin-bottom: 30px;
}
.opacity-30 {
    opacity: 0.3;
}
.icon-v-middle {
    vertical-align: middle;
    margin-right: 5px;
    width: 14px;
}

:root {
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --dock-bg: rgba(26, 32, 44, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: #f8f9fa;
    color: var(--primary-navy);
    min-height: 100vh;
    padding-bottom: 100px; /* Espaço para o menu flutuante */
}

/* --- BACKGROUND MESH (O MESMO DO LOGIN PARA IDENTIDADE) --- */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.5;
    background-image:
        radial-gradient(at 0% 0%, var(--accent-gold) 0px, transparent 50%),
        radial-gradient(at 100% 100%, var(--primary-navy) 0px, transparent 50%);
}

/* --- HEADER DASHBOARD --- */
header {
    position: absolute; /* ou absolute, conforme seu layout */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* Garante que o container do perfil esteja acima dos cards */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

/* --- USER PROFILE & DROPDOWN LUX --- */
.user-profile {
    position: relative; /* Pai relativo para o dropdown ser absoluto */
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    padding: 6px 12px;
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    user-select: none;
}

.user-profile:hover {
    background: var(--var(--white));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 240px;
    z-index: 9999 !important; /* Valor máximo para sobrepor qualquer card */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15); /* Sombra mais profunda para dar elevação */

    /* Mantendo a animação */
    display: none;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.user-menu-dropdown.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-header {
    padding: 10px 12px;
}

.dropdown-header strong {
    display: block;
    font-size: 0.85rem;
    color: var(--primary-navy);
}

.dropdown-header span {
    font-size: 0.7rem;
    opacity: 0.5;
    font-weight: 600;
}

.user-menu-dropdown hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: var(--primary-navy);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
    transition: 0.2s;
}

.dropdown-item i {
    width: 16px;
    opacity: 0.6;
}

.dropdown-item:hover {
    background: var(--dusty-gold);
    color: var(--accent-gold);
}

.dropdown-item.logout {
    color: var(--error-red);
}

.dropdown-item.logout:hover {
    background: rgba(231, 76, 60, 0.05);
}

/* Mobile Adjustment */
@media (max-width: 480px) {
    .user-menu-dropdown {
        right: -10px; /* Ajuste para não cortar na lateral do celular */
    }
}

.avatar {
    width: 35px;
    height: 35px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 800;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    main {
        grid-template-columns: repeat(3, 1fr);
    }
    .full-width {
        grid-column: span 3;
    }
}

.card-lux {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s var(--ease-out);
    position: relative;
    z-index: 1;
}
.card-lux:active {
    transform: scale(0.98);
}

.stat-value {
    font-family: "Outfit";
    font-size: 2rem;
    font-weight: 900;
    margin: 10px 0;
}
.stat-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
}

/* --- LUXURY DOCK 2.0 (MOBILE OPTIMIZED) --- */
.dock-container {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 450px;
    z-index: 100;
}

.dock {
    background: var(--dock-bg) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-radius: 24px !important;
    padding: 12px 10px !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: flex-end !important; /* Alinha os itens pela base para o pulo */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3) !important;
}
/* --- ITEM DA DOCK --- */
.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: rgba(255, 255, 255, 0.45);
    flex: 1;
    position: relative;
}

.dock-item i {
    width: 22px;
    height: 22px;
    transition: all 0.4s ease;
}

/* Escrita Visível */
.dock-item span {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
}

/* --- EFEITO HOVER (ELEGÂNCIA) --- */
@media (hover: hover) {
    .dock-item:hover {
        color: rgba(255, 255, 255, 0.9);
        transform: translateY(-5px);
    }
    .dock-item:hover i {
        color: var(--accent-gold);
    }
}

/* --- ESTADO ATIVO (PULO) --- */
.dock-item.active {
    color: var(--accent-gold);
}

.dock-item.active i {
    filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.5));
}

.dock-item.active span {
    color: var(--white);
    opacity: 1;
}

/* --- APP DRAWER LUX --- */
body.drawer-open {
    overflow: hidden !important;
    height: 100vh;
}

.app-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    z-index: 4000;
    display: none; /* Controlado via JS */
    padding: 40px 10% 120px;
    flex-direction: column;
    animation: drawerFade 0.4s var(--ease-out);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.btn-close {
    position: absolute;
    top: 30px;
    right: 5%;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(0, 0, 0, 0.05); /* Círculo sutil */
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out);
    z-index: 4001;
}

/* Efeito de Hover */
.btn-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1) rotate(90deg);
}

/* O "X" feito com spans */
.btn-close span {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.btn-close span:nth-child(1) {
    transform: rotate(45deg);
}

.btn-close span:nth-child(2) {
    transform: rotate(-45deg);
}

/* Feedback visual ao clicar */
.btn-close:active {
    transform: scale(0.9);
}

@keyframes drawerFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.drawer-header h3 {
    font-family: "Outfit";
    font-weight: 900;
    color: var(--primary-navy);
}

.close-drawer {
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colunas no mobile */
    gap: 25px;
}

@media (min-width: 768px) {
    .drawer-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.drawer-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-navy);
    transition: 0.3s;
}

.icon-box {
    width: 65px;
    height: 65px;
    background: var(--white);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.drawer-icon:hover .icon-box {
    transform: translateY(-5px);
    background: var(--dusty-gold);
    border-color: var(--accent-gold);
}

.drawer-icon span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

main.container {
    padding-top: 70px;
    max-width: 1200px;
}

/* --- GRID DE CARDS (MOBILE FIRST) --- */

main {
    padding-top: 110px;
    min-height: 100vh;
    display: grid;
    gap: 20px;
}

/* --- ANIMAÇÃO DE ENTRADA --- */
.fade-in {
    animation: slideUp 0.8s var(--ease-out) forwards;
    opacity: 0;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botão Flutuante (FAB) Estilizado */
.fab-add {
    position: fixed;
    bottom: 100px; /* Acima da dock */
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: var(
        --primary-navy
    ); /* Ou use var(--accent-gold) para destaque */
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(26, 32, 44, 0.3);
    z-index: 90;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fab-add:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--accent-gold);
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.4);
}

.fab-add:active {
    transform: scale(0.95);
}

.fab-add i {
    width: 28px;
    height: 28px;
}

/* Esconde o FAB se o dispositivo for desktop e você preferir usar botões no header */
@media (min-width: 1024px) {
    .fab-add {
        bottom: 40px;
        right: 40px;
    }
}

/* Pagination */

.pagination-container {
    padding-bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination-wrapper {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-stroke);
    padding: 12px 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: var(--shadow-lux);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-navy);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pages-group {
    display: flex;
    gap: 6px;
    padding: 0 10px;
}

.btn-nav,
.btn-page {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--primary-navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.btn-nav:hover:not(:disabled) {
    background: rgba(197, 160, 89, 0.1);
    color: var(--accent-gold);
    border-color: rgba(197, 160, 89, 0.2);
}

.btn-page.active {
    background: var(--primary-navy);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.select-lux {
    background: transparent;
    border: none;
    font-family: "Outfit";
    font-weight: 800;
    color: var(--accent-gold);
    cursor: pointer;
    outline: none;
    font-size: 14px;
}

.pagination-config {
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    padding-left: 20px;
}

.pagination-config .label {
    font-size: 9px;
    font-weight: 800;
    color: var(--primary-navy);
    opacity: 0.4;
    letter-spacing: 1px;
}

/* Menu Search */

.search-glass {
    background: var(--glass);
    border: 1px solid var(--glass-stroke);
    border-radius: 20px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
}

.search-glass:focus {
    background: var(--glass);
}

.select-lux {
    background: var(--glass);
    border: 1px solid var(--glass-stroke);
    border-radius: 15px;
    padding: 0 15px;
    height: 55px;
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--primary-navy);
    cursor: pointer;
    outline: none;
}

.view-toggle {
    display: flex;
    background: var(--glass);
    border: 1px solid var(--glass-stroke);
    border-radius: 15px;
    padding: 5px;
}

.btn-view {
    width: 45px;
    height: 45px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view svg {
    width: 18px;
    height: 18px;
    background-color: red;
}

.btn-view.active {
    background: var(--primary-navy);
    color: var(--white);
}

/* --- FORM SHEET (BOTTOM SHEET & DRAWER) --- */

/* Impede o scroll no fundo */
body:has(.sheet-content) {
    overflow: hidden;
}

/* Overlay de fundo */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 32, 44, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none; /* Controlado via JS */
    align-items: flex-end; /* Mobile: Alinha no fundo */
    transition: all 0.4s var(--ease-out);
}

/* Container do Conteúdo */
.sheet-content {
    width: 100%;
    background: var(--white);
    border-radius: 30px 30px 0 0;
    padding: 20px 24px 40px 24px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(100%); /* Começa fora da tela */
    transition: transform 0.5s var(--ease-out);
    position: relative;
}

/* Estado Ativo (Animação de entrada) */
.sheet-overlay.active {
    display: flex;
}

.sheet-overlay.active .sheet-content {
    transform: translateY(0);
}

/* Alça de arraste (Visual Mobile) */
.sheet-handle {
    width: 40px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 0 auto 20px auto;
}

/* Botão de Fechar */
.btn-close-sheet {
    background: var(--bg-blue);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--primary-navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s var(--ease-out);
}

.btn-close-sheet:hover {
    background: var(--error-red);
    color: var(--white);
    transform: rotate(90deg);
}

/* --- ELEMENTOS DO FORMULÁRIO --- */

.form-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.4s var(--ease-out) forwards;
    opacity: 0;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    font-family: var(--font-main);
    font-size: 16px; /* Evita zoom no iOS */
    color: var(--primary-navy);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.form-input:focus {
    border-color: var(--accent-gold);
    background: var(--white);
    outline: none;
    box-shadow: 0 0 0 4px var(--dusty-gold);
}

.btn-submit {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: none;
    background: var(--primary-navy);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    margin-top: 10px;
}

.btn-submit:hover:not(:disabled) {
    background: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- ADAPTAÇÃO PARA DESKTOP (SIDE DRAWER) --- */

@media (min-width: 768px) {
    .sheet-overlay {
        justify-content: flex-end; /* Alinha à direita */
        align-items: stretch;
    }

    .sheet-content {
        width: 450px;
        height: 100%;
        border-radius: 30px 0 0 30px;
        transform: translateX(100%); /* Desliza da direita */
        max-height: 100vh;
    }

    .sheet-overlay.active .sheet-content {
        transform: translateX(0);
    }

    .sheet-handle {
        display: none; /* Não precisa de alça no desktop */
    }
}

/* --- ANIMAÇÕES --- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state no botão */
.loading-dots:after {
    content: ".";
    animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
    0%,
    20% {
        color: rgba(0, 0, 0, 0);
        text-shadow:
            0.3em 0 0 rgba(0, 0, 0, 0),
            0.6em 0 0 rgba(0, 0, 0, 0);
    }
    40% {
        color: var(--white);
        text-shadow:
            0.3em 0 0 rgba(0, 0, 0, 0),
            0.6em 0 0 rgba(0, 0, 0, 0);
    }
    60% {
        text-shadow:
            0.3em 0 0 var(--white),
            0.6em 0 0 rgba(0, 0, 0, 0);
    }
    80%,
    100% {
        text-shadow:
            0.3em 0 0 var(--white),
            0.6em 0 0 var(--white);
    }
}

.image-upload-container {
    position: relative;
    width: 100%;
    height: 160px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.image-upload-container:hover {
    border-color: var(--primary-navy);
    background: #f1f5f9;
}

.image-preview-slot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #64748b;
    gap: 8px;
}

.image-preview-slot.hidden {
    display: none;
}

/* Container de Upload */
.image-upload-container {
    position: relative;
    min-height: 160px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hover no Campo */
.image-upload-container:hover {
    border-color: var(--primary-navy);
    background: #f1f5f9;
}

/* Botão de Lixo Estilizado */
.btn-trash-hover {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 25;
    background: rgba(255, 68, 68, 0.9);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

/* Hover no Lixo */
.btn-trash-hover:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.upload-placeholder {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
}

.image-preview-slot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* ==========================================================================
   SISTEMA DE CARDS UNIFICADO (Sinergia Total)
   ========================================================================== */

:root {
    --card-radius: 24px;
    --card-padding: 24px;
    --transition-speed: 0.4s;
    --card-border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Container de Grid Padrão para todas as páginas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

/* O Card Universal */
.standard-card {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    border: var(--card-border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; /* Garante altura igual na mesma linha */
    transition: all var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Efeito Hover Sutil e Profissional */
.standard-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Botão de Edição (O Pen) - Padrão em todos os cards */
.btn-edit-floating {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0; /* Invisível por padrão */
    transform: translateY(5px);
    transition: all 0.3s ease;
    z-index: 20;
}

/* Revela o botão apenas no hover do card pai */
.standard-card:hover .btn-edit-floating {
    opacity: 1;
    transform: translateY(0);
}

.btn-edit-floating:hover {
    background: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(184, 146, 64, 0.3);
}

/* Elementos Internos Padronizados */

/* 1. Header do Card (Tags e Status) */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
}

/* 2. Títulos */
.card-title {
    font-family: "Outfit", sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* 3. Corpo de Informações (Ícones e Texto) */
.card-body {
    flex-grow: 1; /* Faz o corpo expandir para empurrar o footer */
    font-size: 14px;
    color: #64748b;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.info-item i {
    color: var(--accent-gold);
    flex-shrink: 0;
}

/* 4. Footer do Card (Áreas de destaque como listagens ou datas) */
.card-footer-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 20px;
    border: 1px dashed #e2e8f0;
}

.footer-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    display: block;
    margin-bottom: 6px;
}


/* Container do Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

/* Esconde o checkbox padrão */
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* O trilho (slider) */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #e2e8f0;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--white);
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estado Ativo */
input:checked + .slider {
  background-color: #001f3f; /* Sua cor primária */
}

input:checked + .slider:before {
  transform: translateX(20px);
}