/* assets/css/styles1.css */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Wrapper sidebar + conteúdo ocupa o restante da altura */
.flex.flex-1, div.flex.flex-1 {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Sidebar full height no desktop */
#sidebar {
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

@media (hover: none) {
    a, button, input, textarea {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        touch-action: manipulation;
    }
}

/* ===== LAYOUT ===== */
.mx-auto {
    margin-bottom: 5rem;
}

/* Conteúdo principal com scroll */
main.flex-1 {
    overflow-y: auto;
    height: calc(100vh - 60px);
}

/* Wrapper de conteúdo — ocupa tudo no desktop, centraliza no mobile */
.content-wrapper {
    padding: 20px 24px 96px;
    width: 100%;
    max-width: 900px;
}
@media (max-width: 767px) {
    .content-wrapper {
        padding: 16px 12px 180px 16px; /* Menos padding à direita para dar espaço aos FABs */
        max-width: 100%;
    }
}
.app-header {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-greeting {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.header-greeting .greeting-text {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}
.header-greeting .greeting-name {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
}
.header-icon-btn:hover { background: rgba(255,255,255,0.25); }

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: cover;
}

/* ===== BADGE ===== */
.badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #2563eb;
}

.notificacoes-nao-lidas { position: relative; }
.fa-x { font-size: 1.1em; }

/* ===== SIDEBAR ===== */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: #eff6ff; color: #2563eb; }
.sidebar-link:hover .sidebar-icon { color: #2563eb; }
.sidebar-link.active_desktop {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}
.sidebar-link.active_desktop .sidebar-icon { color: #2563eb; }
.sidebar-link-add {
    background: #2563eb;
    color: white !important;
    margin: 4px 0;
}
.sidebar-link-add:hover { background: #1d4ed8 !important; color: white !important; }
.sidebar-link-add .sidebar-icon { color: white !important; }
.sidebar-icon {
    width: 28px;
    text-align: center;
    font-size: 0.95rem;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.15s;
}
.sidebar-divider { height: 1px; background: #f1f5f9; margin: 8px 4px; }

/* ===== ACTIVE STATES ===== */
.active { color: #2563EB; }
footer a:hover, footer a.active { color: #2563EB; }

/* Footer Nav — mobile only */
.footer-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    padding: 0 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
    z-index: 50;
}
/* Esconde no desktop */
@media (min-width: 768px) {
    .footer-nav { display: none !important; }
}
.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 12px;
    transition: color 0.15s, background 0.15s;
    min-width: 52px;
}
.footer-nav-item i { font-size: 1.25rem; transition: transform 0.15s; }
.footer-nav-item:hover, .footer-nav-item.active {
    color: #2563eb;
    background: #eff6ff;
}
.footer-nav-item:hover i { transform: translateY(-1px); }
.footer-nav-fab {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(37,99,235,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 8px;
}
.footer-nav-fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(37,99,235,0.55); }
.footer-nav-fab i { font-size: 1.2rem; }

/* ===== TOAST ===== */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: #1e293b;
    color: white;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: toastIn 0.25s ease, toastOut 0.3s ease 2.5s forwards;
    white-space: nowrap;
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.info { background: #2563eb; }
@keyframes toastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateY(8px); } }

/* ===== DASHBOARD CARDS ===== */
.hero-card {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 60%, #3b82f6 100%);
    border-radius: 20px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(37,99,235,0.35);
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.hero-card::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -20px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero-balance-label {
    font-size: 0.78rem;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.hero-balance-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 4px 0 16px;
}
.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.hero-stat {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 10px 14px;
    backdrop-filter: blur(4px);
}
.hero-stat-label {
    font-size: 0.7rem;
    opacity: 0.75;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}
.hero-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
}

/* ===== SHORTCUT GRID ===== */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: white;
    border-radius: 14px;
    text-decoration: none;
    color: #374151;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.shortcut-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.15);
    background: #eff6ff;
    color: #2563eb;
}
.shortcut-item:hover .shortcut-icon { background: #2563eb; }
.shortcut-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #2563eb;
    transition: background 0.15s;
}
.shortcut-icon.green { background: #dcfce7; color: #16a34a; }
.shortcut-icon.red { background: #fee2e2; color: #dc2626; }
.shortcut-icon.yellow { background: #fef9c3; color: #ca8a04; }
.shortcut-icon.purple { background: #f3e8ff; color: #9333ea; }
.shortcut-icon.orange { background: #ffedd5; color: #ea580c; }
.shortcut-icon.teal { background: #ccfbf1; color: #0d9488; }
.shortcut-item:hover .shortcut-icon.green,
.shortcut-item:hover .shortcut-icon.red,
.shortcut-item:hover .shortcut-icon.yellow,
.shortcut-item:hover .shortcut-icon.purple,
.shortcut-item:hover .shortcut-icon.orange,
.shortcut-item:hover .shortcut-icon.teal { background: #2563eb; color: white; }

/* ===== SECTION CARDS ===== */
.section-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.section-title i { font-size: 0.9rem; }
.section-title a {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}
.section-title a:hover { text-decoration: underline; }

/* ===== ACCOUNT ITEMS ===== */
.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.account-item:last-child { border-bottom: none; }
.account-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 12px;
}
.account-name { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.account-sub { font-size: 0.72rem; color: #94a3b8; margin-top: 1px; }
.account-balance { font-size: 0.95rem; font-weight: 700; color: #1e293b; }
.account-balance.positive { color: #16a34a; }
.account-balance.negative { color: #dc2626; }

/* ===== CREDIT CARD ITEMS ===== */
.card-item { padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.card-item:last-child { border-bottom: none; }
.card-progress-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 99px;
    margin-top: 8px;
    overflow: hidden;
}
.card-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.6s ease;
}
.card-progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.card-progress-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    color: #94a3b8;
    text-align: center;
}
.empty-state i { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.4; }
.empty-state p { font-size: 0.85rem; margin-bottom: 14px; }
.empty-state a {
    font-size: 0.8rem;
    background: #2563eb;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s;
}
.empty-state a:hover { background: #1d4ed8; }

/* ===================================================
   FORMULÁRIOS — Design System Global
   =================================================== */

/* Wrapper de campo */
.form-group {
    position: relative;
    margin-bottom: 16px;
}

/* Label padrão */
.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* Input / Select / Textarea base */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.form-textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
    min-height: 90px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-input::placeholder { color: #94a3b8; }

/* Input com ícone à esquerda */
.form-input-icon {
    position: relative;
}
.form-input-icon .form-input,
.form-input-icon .form-select {
    padding-left: 42px;
}
.form-input-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
}
.form-input-icon:focus-within .input-icon { color: #2563eb; }

/* Input com ação à direita (ex: mostrar senha) */
.form-input-action {
    position: relative;
}
.form-input-action .form-input {
    padding-right: 44px;
}
.form-input-action .input-action-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.form-input-action .input-action-btn:hover { color: #2563eb; }

/* Select com seta customizada */
.form-select-wrap {
    position: relative;
}
.form-select-wrap::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.75rem;
    pointer-events: none;
}
.form-select-wrap .form-select { padding-right: 36px; }

/* Estado de erro */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
    background: #fff5f5;
}
.form-input.error:focus,
.form-select.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.form-error-msg {
    font-size: 0.72rem;
    color: #ef4444;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Alerta de erro (topo do form) */
.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 16px;
}
.form-alert.error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.form-alert.success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.form-alert.warning { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }

/* Classe base para botões */
.btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.btn:hover { 
    opacity: 0.92; 
    transform: translateY(-1px); 
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Botão primário */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(37,99,235,0.35); }

/* Botão primário danger (vermelho) */
.btn-primary.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.btn-primary.btn-danger:hover { 
    box-shadow: 0 6px 16px rgba(239,68,68,0.35); 
}

/* Botão secundário */
.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    transition: background 0.15s, border-color 0.15s, opacity 0.2s, transform 0.15s;
}
.btn-secondary:hover { 
    background: #e2e8f0; 
    border-color: #cbd5e1; 
    opacity: 0.92; 
    transform: translateY(-1px); 
}
.btn-secondary:active { transform: translateY(0); }
.btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Botão danger */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.btn-danger:hover { 
    box-shadow: 0 6px 16px rgba(239,68,68,0.35); 
}

/* Botão success */
.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 12px rgba(34,197,94,0.25);
}
.btn-success:hover { 
    box-shadow: 0 6px 16px rgba(34,197,94,0.35); 
}

/* Botão inline pequeno */
.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 0.8rem;
    border-radius: 8px;
    width: auto;
}

/* Botão com largura automática e padding customizado */
.btn-auto {
    width: auto;
    padding: 0 20px;
}

/* Botão ícone */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
}
.btn-icon:hover { background: #e2e8f0; }
.btn-icon.edit:hover { background: #eff6ff; color: #2563eb; }
.btn-icon.delete:hover { background: #fee2e2; color: #dc2626; }

/* Botão de excluir no modal (inicialmente oculto) */
.btn-delete-modal {
    display: none;
    margin-top: 12px;
}

/* Divisor de formulário */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 0.78rem;
}
.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Card de formulário */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
.form-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

/* Grid de 2 colunas em telas maiores */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 480px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* ===== LISTA DE ITENS (receitas/despesas) ===== */
.item-list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: box-shadow 0.15s;
}
.item-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }

.item-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.item-card-icon.receita { background: #dcfce7; color: #16a34a; }
.item-card-icon.despesa { background: #fee2e2; color: #dc2626; }

.item-card-body { flex: 1; min-width: 0; }
.item-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-card-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

.item-card-value {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.item-card-value.receita { color: #16a34a; }
.item-card-value.despesa { color: #dc2626; }

.item-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.item-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #94a3b8;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.item-card:hover .item-card-arrow {
    color: #64748b;
    transform: translateX(2px);
}

/* Mobile adjustments for item-cards */
@media (max-width: 640px) {
    .item-card {
        padding: 12px;
        gap: 10px;
    }
    
    .item-card-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .item-card-title {
        font-size: 0.82rem;
        line-height: 1.3;
    }
    
    .item-card-sub {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .item-card-value {
        font-size: 0.9rem;
    }
    
    .item-card-actions {
        gap: 4px;
    }
    
    .item-card-actions .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .item-card-arrow {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
}

/* ===== BARRA DE BUSCA/FILTRO ===== */
.list-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}
.list-toolbar .form-input-icon {
    flex: 1;
}
.list-toolbar .form-select-wrap {
    width: 160px;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .list-toolbar { flex-direction: column; }
    .list-toolbar .form-select-wrap { width: 100%; }
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title i { font-size: 1rem; }

/* ===================================================
   BOTTOM SHEET
   =================================================== */
.bs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.bs-overlay.open { display: block; opacity: 1; }

.bottom-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.15);
}
.bottom-sheet.open { transform: translateY(0); }

/* No desktop vira modal centralizado */
@media (min-width: 768px) {
    .bottom-sheet {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -40%);
        width: 480px;
        border-radius: 20px;
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
        max-height: 85vh;
    }
    .bottom-sheet.open {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.bs-handle {
    width: 40px; height: 4px;
    background: #e2e8f0;
    border-radius: 99px;
    margin: 12px auto 0;
    flex-shrink: 0;
    cursor: grab;
}
@media (min-width: 768px) { .bs-handle { display: none; } }

.bs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.bs-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bs-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.bs-close:hover { background: #e2e8f0; }

.bs-body {
    overflow-y: auto;
    padding: 16px 20px 24px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* ===================================================
   FAB — Floating Action Button
   =================================================== */
.fab {
    position: fixed;
    right: 16px; /* mais próximo da borda direita */
    bottom: 80px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 16px rgba(37,99,235,0.45);
    z-index: 10000;
    transition: transform 0.3s ease, box-shadow 0.2s, opacity 0.3s ease;
    opacity: 1;
}
.fab:hover:not(.hidden) { transform: scale(1.08); box-shadow: 0 6px 20px rgba(37,99,235,0.55); }
.fab.open { transform: rotate(45deg); }
.fab.hidden { 
    transform: translateY(100px) !important; 
    opacity: 0 !important; 
    pointer-events: none !important; 
}

.fab.modal-hidden {
    transform: translateY(100px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}
@media (min-width: 768px) {
    .fab { bottom: 28px; right: 24px; } /* mais próximo da borda no desktop */
}

/* FAB colorido por tipo */
.fab.green  { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 4px 16px rgba(22,163,74,0.4); }
.fab.red    { background: linear-gradient(135deg, #dc2626, #b91c1c); box-shadow: 0 4px 16px rgba(220,38,38,0.4); }
.fab.yellow { background: linear-gradient(135deg, #d97706, #b45309); box-shadow: 0 4px 16px rgba(217,119,6,0.4); }
.fab.teal   { background: linear-gradient(135deg, #0d9488, #0f766e); box-shadow: 0 4px 16px rgba(13,148,136,0.4); }
.fab.purple { background: linear-gradient(135deg, #9333ea, #7c3aed); box-shadow: 0 4px 16px rgba(147,51,234,0.4); }
