:root {
  color-scheme: dark;
  --bg: #090b16;
  --text: #f7f8ff;
  --text-soft: #b6bdd5;
  --accent: #86f2ff;
  --accent-2: #9b7dff;
  --success: #77f4b5;
  --danger: #ff8eab;
  --radius-xl: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #17224f 0%, #0b1024 34%, #05070e 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Background Animado --- */
.background-orbs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 999px; filter: blur(18px); opacity: .55; animation: floatOrb 11s ease-in-out infinite; }
.orb-1 { width: 280px; height: 280px; background: rgba(134, 242, 255, .30); top: 5%; left: 8%; }
.orb-2 { width: 380px; height: 380px; background: rgba(155, 125, 255, .22); right: 10%; top: 18%; animation-delay: 1.8s; }
.orb-3 { width: 300px; height: 300px; background: rgba(119, 244, 181, .16); left: 35%; bottom: -60px; animation-delay: 3s; }

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-22px) translateX(12px) scale(1.05); }
}

/* --- Cartões Glassmorphism (ULTRA GLASS) --- */
.glass-card, .glass-inner {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.25);
  border-left: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card { border-radius: var(--radius-xl); padding: 24px; }
.glass-inner { border-radius: var(--radius-md); }

article.glass-card:hover { transform: translateY(-4px); box-shadow: 0 16px 50px 0 rgba(0, 0, 0, 0.5); }

/* --- UI Elements --- */
.brand-chip, .decision-badge, .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08); font-size: .82rem; color: var(--text-soft);
}

/* --- Layout Principal (Dashboard PC) --- */
.dashboard-shell {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: auto 1fr; gap: 24px; padding: 24px;
}

/* --- Sidebar Desktop --- */
.sidebar.glass-card {
  position: sticky; top: 24px; height: calc(100vh - 48px); width: 60px;
  padding: 24px 15px; overflow: hidden; display: flex; flex-direction: column;
  justify-content: space-between; transition: width 0.4s ease, padding 0.4s ease;
  white-space: nowrap; z-index: 100;
}
.sidebar.expanded.glass-card { width: 280px; padding: 24px; }
.sidebar-top { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.sidebar:not(.expanded) .sidebar-top { align-items: center; }

/* Perfil Desktop */
.profile-upload-wrapper {
  position: relative; width: 50px; height: 50px; flex-shrink: 0; display: block;
  margin-bottom: 15px; cursor: pointer; transition: all 0.4s ease;
}
.sidebar.expanded .profile-upload-wrapper { width: 80px; height: 80px; }
.profile-pic, .placeholder-avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center;
}
.placeholder-avatar { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #05101b; font-size: 1.5rem; font-weight: 800; }

/* Menu Hambúrguer Desktop */
.hamburger-menu {
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 10px; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0;
}
.hamburger-menu span { display: block; width: 25px; height: 2px; background: var(--text-soft); border-radius: 2px; transition: 0.3s; }

/* Saldo na Sidebar Desktop */
.sidebar-balance-container {
  display: flex; flex-direction: column; gap: 4px; margin-top: 15px; padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1); width: 100%; transition: opacity 0.3s ease;
}
.balance-label { font-size: 0.65rem; color: var(--text-soft); text-transform: uppercase; font-weight: 600; }
.balance-value { font-size: 1.35rem; font-weight: 800; color: var(--success); }

/* Navegação Desktop */
.sidebar-nav { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; width: 100%; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 15px; color: var(--text-soft);
  padding: 14px; border-radius: 16px; background: rgba(255,255,255,0.04); transition: all 0.3s ease; overflow: hidden;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.10); color: var(--text); }
.sidebar-nav a.active { background: rgba(134, 242, 255, 0.15); color: var(--accent); font-weight: 600; border-left: 3px solid var(--accent); }
.nav-icon { font-size: 1.3rem; min-width: 25px; display: flex; justify-content: center; flex-shrink: 0; }

/* Recolher Sidebar Desktop */
.sidebar-title, .sidebar-copy, .sidebar-balance-container { transition: opacity 0.2s ease, width 0.3s ease; opacity: 1; }

/* Esconde totalmente textos, navegação e botão de sair quando a barra estiver comprimida */
.sidebar:not(.expanded) .sidebar-title, 
.sidebar:not(.expanded) .sidebar-copy,
.sidebar:not(.expanded) .sidebar-balance-container,
.sidebar:not(.expanded) .sidebar-nav,
.sidebar:not(.expanded) > a.secondary-button { 
    display: none !important; 
}

/* --- Autenticação e Forms --- */
.auth-shell, .single-card-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; align-items: center; gap: 24px; padding: 32px; }
.auth-shell { grid-template-columns: 1.15fr .85fr; }
.single-card-wrap { justify-items: center; }
.narrow-card { max-width: 520px; width: 100%; }
.hero-card h1, .topbar h1 { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.02; margin: 18px 0 14px; }
.hero-card p, .sidebar-copy, .section-copy, .hero-list, .auth-card p { color: var(--text-soft); }
.hero-list { padding-left: 18px; line-height: 1.8; }
.developer-link, .muted-link { color: var(--accent); font-weight: 600; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.tab-button, .primary-button, .secondary-button { border: 0; cursor: pointer; transition: transform .18s ease; }
.tab-button { padding: 14px 16px; border-radius: 16px; color: var(--text-soft); background: rgba(255,255,255,0.06); }
.tab-button.active { color: var(--text); background: rgba(255,255,255,0.15); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label, .compact-form label { display: grid; gap: 8px; color: var(--text-soft); font-size: .92rem; }
.form-grid .full-width, .compact-form .full-width { grid-column: 1 / -1; }
input, select { width: 100%; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.08); color: var(--text); border-radius: 14px; padding: 14px; outline: none; transition: all 0.3s; }
input::placeholder { color: rgba(255,255,255,0.38); }
input:focus, select:focus { border-color: rgba(134, 242, 255, 0.55); box-shadow: 0 0 0 4px rgba(134, 242, 255, 0.10); }
select option { background-color: var(--bg); color: var(--text); }

/* 1. Base comum para ambos os botões (Física e Layout) */
.primary-button, .secondary-button { 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 50px; 
    border-radius: 16px; 
    padding: 0 18px; 
    font-weight: 700; 
    cursor: pointer; 
    /* A Física de Borracha agora se aplica a todos! */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease !important;
}

/* 2. Cores exclusivas do Primário */
.primary-button { 
    color: #05101b; 
    background: linear-gradient(135deg, var(--accent), #c8f7ff); 
    border: none; 
}

/* 3. Cores exclusivas do Secundário (Glassmorphism) */
.secondary-button {
    background: rgba(255,255,255,0.08); 
    border: 1px solid rgba(255,255,255,0.12); 
    color: var(--text); 
}

body {
    cursor: default;
}

/* 4. O Hover Correto (Apenas o brilho Neon, sem transform) */
.primary-button:hover, .secondary-button:hover, .tab-button:hover { 
    box-shadow: 0 8px 25px rgba(134, 242, 255, 0.2); 
}

/* 5. Utilitários */
.inline-button { width: fit-content; }
.full-width { width: 100%; }
.hidden { display: none !important; }

/* --- Flash Messages Centralizados --- */
.flash-stack { 
  position: fixed; 
  top: 24px; 
  left: 50%; 
  transform: translateX(-50%); 
  z-index: 2000; 
  display: grid; 
  gap: 10px; 
  width: 90%; 
  max-width: 450px; 
}

.flash-message { 
  padding: 14px 20px; 
  border-radius: 16px; 
  border: 1px solid rgba(255,255,255,0.18); 
  backdrop-filter: blur(15px); 
  -webkit-backdrop-filter: blur(15px);
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.flash-message button { background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; padding-left: 15px; opacity: 0.7; }
.flash-success { background: rgba(119, 244, 181, 0.15); color: var(--success); border-color: rgba(119, 244, 181, 0.3); }
.flash-error { background: rgba(255, 142, 171, 0.15); color: var(--danger); border-color: rgba(255, 142, 171, 0.3); }

/* --- Animação de Erro (Shake/Vibração) --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.input-error {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
  border-color: var(--danger) !important;
  background: rgba(255, 142, 171, 0.08) !important;
  color: var(--danger) !important;
}
.input-error::placeholder { color: rgba(255, 142, 171, 0.5); }

/* --- Dashboard --- */
.dashboard-main { display: grid; gap: 24px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.metric-card { padding: 18px; display: grid; gap: 10px; }
.metric-card span { color: var(--text-soft); font-size: .9rem; }
.metric-card strong { font-size: clamp(1.15rem, 2vw, 1.7rem); }
.decision-grid, .two-column-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.panel-section { display: grid; gap: 20px; }
.card-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }

/* --- Cartões --- */
.card-finance-card .card-top, .card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-visual, .placeholder-image { width: 68px; height: 68px; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, rgba(134,242,255,.28), rgba(155,125,255,.28)); }
.placeholder-image { display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; }
.progress-shell { margin: 16px 0; }
.progress-bar { height: 10px; width: 100%; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 0.8s ease; }
.card-options { position: absolute; top: 15px; right: 15px; }
.options-trigger { background: none; border: none; color: var(--text-soft); font-size: 1.5rem; cursor: pointer; }
.options-menu { position: absolute; right: 0; top: 30px; background: #1a1f35; border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; z-index: 10; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: 150px; }
.delete-link { background: none; border: none; color: var(--danger); width: 100%; text-align: left; padding: 8px; font-size: 0.9rem; cursor: pointer; font-weight: 600; }

/* --- Tabelas --- */
.stats-table table { width: 100%; border-collapse: collapse; }
.stats-table th, .stats-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.empty-state { display: grid; place-items: center; min-height: 140px; color: var(--text-soft); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }

/* =========================================================
   RESPONSIVIDADE (TABLET & MOBILE)
   ========================================================= */
@media (max-width: 900px) {
  .auth-shell, .decision-grid, .two-column-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dashboard-shell { grid-template-columns: 1fr; padding: 15px; padding-bottom: 110px; }
  
  .sidebar.glass-card, .sidebar.expanded.glass-card {
    position: fixed; bottom: 0; top: auto; left: 0; width: 100% !important; height: 85px;
    padding: 10px 5px 25px 5px !important; flex-direction: row; justify-content: space-evenly;
    align-items: center; border-radius: 24px 24px 0 0; z-index: 1000;
    background: rgba(10, 14, 28, 0.90); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: none; border-top: 1px solid rgba(255,255,255,0.1); box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  }

  .sidebar-top { display: none !important; }
  .sidebar-nav { display: flex; flex-direction: row; justify-content: space-around; width: 100%; margin: 0; gap: 0; }
  
  .sidebar-nav a, .sidebar > a.secondary-button {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 8px; background: transparent !important; border: none !important; border-radius: 0; width: 100%; height: auto;
  }
  
  .sidebar-nav a .nav-icon, .sidebar > a.secondary-button .nav-icon { font-size: 1.4rem; margin: 0; display: flex !important; opacity: 1 !important; width: auto !important; height: auto !important; }
  
  .sidebar-nav a span:not(.nav-icon), .sidebar > a.secondary-button span:not(.nav-icon) {
    display: block !important; opacity: 1 !important; width: auto !important; height: auto !important;
    font-size: 0.65rem; line-height: 1; font-weight: 500; text-align: center;
  }

  .sidebar-nav a.active { color: var(--accent); border: none; }
  .sidebar-nav a.active .nav-icon { transform: scale(1.15); transition: transform 0.2s; }
  .sidebar > a.secondary-button { color: var(--text-soft); }

  .stats-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .form-grid, .compact-form { grid-template-columns: 1fr; }
  .hero-card h1, .topbar h1 { font-size: 2rem; }
}
/* Ajuste do tamanho e alinhamento dos Chips de Categoria e Ação */
.category-chip {
    display: inline-flex;
    align-items: center; /* Alinha o círculo perfeitamente com o texto */
    gap: 12px; /* Dá um respiro maior entre a bolinha e o emoji */
    padding: 12px 20px; /* Deixa o botão mais "gordinho" e fácil de clicar (Ótimo para celular) */
    border-radius: 30px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-soft);
    font-size: 0.95rem; /* Aumenta um pouco a letra */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Ajuste fino no próprio círculo de seleção (radio button) */
.category-chip input[type="radio"] {
    margin: 0;
    width: 20px; /* Bolinha maior para facilitar o clique */
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent); /* Pinta a bolinha com a cor do seu tema */
}

/* Design dos Botões que Expandem (Sanfona) */
.custom-dropdown {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 10px;
}
.custom-dropdown summary {
    font-weight: 600;
    color: var(--text);
    list-style: none; /* Esconde a setinha padrão do HTML */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-dropdown summary::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--text-soft);
}
.custom-dropdown[open] summary::after { content: '▲'; }
.custom-dropdown[open] { background: rgba(255, 255, 255, 0.06); }
.custom-dropdown summary::-webkit-details-marker { display: none; }

/* ========================================= */
/* NOVO DESIGN: CARROSSEL HORIZONTAL (CHIPS) */
/* ========================================= */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 12px;
    margin-top: 8px;
    /* Esconde a barra de rolagem mas mantém a função */
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
.category-scroll::-webkit-scrollbar {
    display: none; 
}

.category-chip {
    flex-shrink: 0; /* Impede que o botão seja esmagado */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 30px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-soft);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Esconde a bolinha padrão do radio para ficar com cara de botão */
.category-chip input[type="radio"] {
    display: none; 
}

/* Quando o botão está selecionado */
.category-chip:has(input:checked) {
    background: rgba(134, 242, 255, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.02);
}

/* ========================================= */
/* DESIGN DOS CARDS DE RESERVA               */
/* ========================================= */
.reserva-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
}
.reserva-item-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}
.reserva-item-info span {
    font-size: 0.85rem;
    color: var(--text-soft);
}

/* ========================================= */
/* BOTÕES DA TABELA (ULTRA GLASS)            */
/* ========================================= */

.transactions-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

#btn-expand-tx, #btn-collapse-tx {
    /* Efeito Vidro */
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Bordas suaves */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    
    /* Tipografia e Espaçamento */
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent); /* Usa o seu azul neon */
    
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Efeito ao passar o mouse (Hover) */
#btn-expand-tx:hover, #btn-collapse-tx:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12); /* Fica um pouco mais "leitoso" */
    border-color: var(--accent); /* Borda acende com a cor neon */
    color: #ffffff; /* Texto brilha */
    box-shadow: 0 8px 25px rgba(134, 242, 255, 0.15); /* Sombra neon sutil */
}

/* Efeito quando você passa o mouse por cima */
#btn-expand-tx:hover, #btn-collapse-tx:hover {
    background-color: #f3f4f6; /* Cinza clarinho ao passar o mouse */
    border-color: #3b82f6; /* A borda fica azul */
    transform: translateY(-2px); /* O botão "sobe" 2 pixels, dando profundidade */
}

/* Pequeno ajuste nos itens da lista para eles surgirem suavemente */
.transaction-item {
    transition: opacity 0.3s ease;
    border-bottom: 1px solid #f9fafb; /* Linha divisória bem sutil */
    padding: 12px 0;
}

/* ========================================== */
/* FILTRO GOOEY (EFEITO GELATINOSO/ORGÂNICO)  */
/* ========================================== */

/* Esta classe deve ser colocada no CONTAINER que segura os botões que vão se fundir */
.gooey-container {
    /* A Mágica: Desfoca tudo dentro do container e depois aumenta o contraste. 
       Isso faz as bordas dos elementos "derreterem" umas nas outras. */
    filter: url('#gooey-filter'); /* Referência ao SVG (opcional, para melhor suporte) */
    -webkit-filter: blur(10px) contrast(20);
    filter: blur(10px) contrast(20);
    
    /* Para não estragar a cor de fundo do seu site, precisamos isolar o container */
    background: transparent;
    mix-blend-mode: screen; 
}

/* Os itens dentro do container (que vão grudar) precisam perder a transparência 
   por um momento para que o contraste funcione bem */
.gooey-item {
    background: var(--accent); /* Cor sólida para o efeito funcionar melhor */
    border-radius: 50%; /* Bordas redondas grudam melhor */
}

/* Container que ativa a física de gelatina */
.gooey-wrapper {
    filter: url('#goo'); /* Chama o filtro SVG que criamos */
    padding: 10px; /* Espaço para o efeito não cortar nas bordas */
    margin: -10px; 
    overflow: visible;
}

.category-chip {
    /* Precisamos de uma cor sólida e sem transparência para o Gooey funcionar 100% */
    background: #1a1f35; 
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

/* Quando passamos o mouse, o chip aumenta e "puxa" a borda do vizinho */
.category-chip:hover {
    background: var(--accent);
    color: #05101b;
    transform: scale(1.1);
    z-index: 10;
}

/* Quando selecionado, ele brilha e se destaca na gelatina */
.category-chip:has(input:checked) {
    background: var(--accent);
    color: #05101b;
    box-shadow: 0 0 20px var(--accent);
}

/* ========================================== */
/* MODAL DE EDIÇÃO (GLASSMORPHISM)            */
/* ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0; /* Cobre a tela toda */
    background: rgba(5, 7, 14, 0.7); /* Fundo escuro semitransparente */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-overlay .glass-card {
    width: 90%;
    max-width: 400px;
    transform: translateY(30px); /* Começa um pouco para baixo */
    /* A mesma física de mola (Luffy) que usamos nos botões! */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .glass-card {
    transform: translateY(0); /* Sobe para o centro */
}

/* Botão de Fechar o Modal */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-soft);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ==========================================
   FIX: MENU SUSPENSO (GLASSMORPHISM) & ALINHAMENTO
   ========================================== */
.reserva-item {
    overflow: visible !important;
}

/* 1. Transforma o container das opções em Flex para alinhar o botão no centro exato do eixo Y */
.reserva-item .card-options {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Garante que preencha a altura da linha para alinhar com o texto */
    margin: 0;
    top: auto; 
    right: auto;
}

/* 2. Reseta o botão dos 3 pontinhos para uma forma perfeitamente simétrica */
.reserva-item .options-trigger {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text, #fff);
    cursor: pointer;
    line-height: 1;
    transition: background 0.3s ease;
}

/* Um hover sutil no Glassmorphism para os pontinhos */
.reserva-item .options-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.reserva-item .options-menu {
    position: absolute;
    top: 40px; /* Desloca o menu elegantemente para baixo do botão centralizado */
    right: 0;
    z-index: 9999 !important;
    min-width: 160px;
}