/* ============================================
   ESC Advocacia - Sistema Financeiro
   Identidade Visual Premium v2
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Paleta Principal */
    --azul-principal: #0A1A3A;
    --azul-complementar: #102349;
    --azul-profundo: #16315F;
    --azul-botao: #2B5FC0;
    --azul-botao-hover: #234fa3;
    --dourado: #C8A84B;
    --dourado-hover: #b8993f;
    --branco: #FFFFFF;
    --off-white: #F5F3EE;
    --cinza-escuro: #0A1A3A;
    --cinza-medio: #4A5578;
    --cinza-claro: #D9DEE8;
    --fundo-neutro: #F4F6FA;

    /* Cores de Estado */
    --sucesso: #1F7A4D;
    --fundo-sucesso: #EAF6EF;
    --atencao: #B7791F;
    --fundo-atencao: #FFF6E5;
    --erro: #C0392B;
    --fundo-erro: #FDEDEC;
    --info: #2563EB;
    --fundo-info: #EAF1FF;

    /* Textos */
    --texto-secundario: #4A5578;
    --borda: #D9DEE8;

    /* Sidebar */
    --sidebar-width: 270px;

    /* Icones sidebar */
    --icon-color: #7EB3FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--cinza-escuro);
    background-color: var(--fundo-neutro);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, .page-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* ============================================
   LOGIN
   ============================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A1A3A;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(200, 168, 75, 0.06) 0%, rgba(43, 95, 192, 0.04) 40%, transparent 70%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

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

.login-logo img {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-card {
    background: var(--branco);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--azul-principal);
    margin-bottom: 8px;
}

.login-card .login-subtitle {
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-medio);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-escuro);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-control-custom {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--cinza-escuro);
    background: var(--fundo-neutro);
    border: 1.5px solid var(--cinza-claro);
    border-radius: 12px;
    transition: all 0.25s ease;
    outline: none;
}

.form-control-custom::placeholder {
    color: var(--cinza-medio);
    font-size: 14px;
}

.form-control-custom:focus {
    border-color: var(--azul-botao);
    background: var(--branco);
    box-shadow: 0 0 0 3px rgba(43, 95, 192, 0.15);
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--azul-principal);
    background: var(--dourado);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 8px;
}

.btn-login:hover {
    background: var(--dourado-hover);
    box-shadow: 0 8px 24px rgba(200, 168, 75, 0.3);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: rgba(255, 255, 255, 0.4);
}

.alert-login {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-login.error {
    background: var(--fundo-erro);
    color: var(--erro);
    border: 1px solid rgba(192, 57, 43, 0.15);
}

.alert-login.success {
    background: var(--fundo-sucesso);
    color: var(--sucesso);
    border: 1px solid rgba(31, 122, 77, 0.15);
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: #0A1A3A;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
}

/* Sidebar colapsada */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .sidebar-header img {
    width: 36px;
    padding: 20px 0;
}

.sidebar.collapsed .nav-section-title {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
    margin: 2px 8px;
    border-left: none;
}

.sidebar.collapsed .nav-item span:not(.nav-icon) {
    display: none;
}

.sidebar.collapsed .nav-item .nav-text {
    display: none;
}

.sidebar.collapsed .sidebar-footer {
    padding: 16px 8px;
}

.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .btn-logout {
    display: none;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
}

.sidebar.collapsed .nav-section {
    padding: 0 4px;
}

/* Botao de recolher sidebar */
.sidebar-collapse-btn {
    position: absolute;
    top: 28px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--azul-principal);
    border: 2px solid rgba(200, 168, 75, 0.4);
    border-radius: 50%;
    color: var(--dourado);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    transition: all 0.2s ease;
    padding: 0;
}

.sidebar-collapse-btn:hover {
    background: var(--azul-profundo);
    border-color: var(--dourado);
}

.sidebar-collapse-btn svg {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 0;
    border-bottom: 1px solid rgba(200, 168, 75, 0.25);
    flex-shrink: 0;
}

.sidebar-header img {
    width: 150px;
    display: block;
    margin: 0 auto;
    padding: 28px 0;
}

.sidebar-nav {
    flex: 1 1 0;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(200, 168, 75, 0.4);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 168, 75, 0.8);
}

.sidebar-nav .nav-section {
    padding: 0 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(200, 168, 75, 0.25);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.sidebar-nav .nav-section:last-child {
    border-bottom: none;
}

.sidebar-nav .nav-section-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 8px;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 2px 12px;
    border-radius: 10px;
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--branco);
}

.nav-item.active {
    background: rgba(43, 95, 192, 0.25);
    border-left-color: var(--dourado);
    color: var(--branco);
    font-weight: 600;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--icon-color);
}

.nav-item.active .nav-icon {
    color: var(--icon-color);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(200, 168, 75, 0.2);
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--azul-profundo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--dourado);
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-info .user-name {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--branco);
}

.sidebar-user-info .user-role {
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: rgba(255, 255, 255, 0.45);
    text-transform: capitalize;
}

.btn-logout {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(192, 57, 43, 0.2);
    color: var(--erro);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #e8f0fe 0%, #f4f6fa 50%, #e8f0fe 100%);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content,
.app-wrapper.sidebar-collapsed .main-content {
    margin-left: 72px;
}

/* Circulos de luz difusa */
.main-content::before,
.main-content::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.main-content::before {
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(43, 95, 192, 0.07) 0%, transparent 70%);
}

.main-content::after {
    top: 40%;
    right: -150px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200, 168, 75, 0.05) 0%, transparent 70%);
}

.content-area {
    position: relative;
    z-index: 1;
    padding: 28px 32px;
}

/* Terceiro circulo via elemento extra */
.glow-circle-3 {
    position: absolute;
    bottom: -100px;
    left: 30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(43, 95, 192, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.top-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(10, 26, 58, 0.08);
    box-shadow: 0 1px 20px rgba(10, 26, 58, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.top-header .header-logo img {
    width: 110px;
    height: auto;
    display: block;
}

.top-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--azul-principal);
}

.top-header .header-date {
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-medio);
    font-weight: 500;
}

/* ============================================
   CARDS DE RESUMO - LIQUID GLASS
   ============================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(10, 26, 58, 0.10),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(10, 26, 58, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.summary-card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.summary-card .card-label {
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-medio);
    margin-bottom: 6px;
}

.summary-card .card-value {
    font-size: 26px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--azul-principal);
    letter-spacing: -0.5px;
}

.summary-card .card-sub {
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-medio);
    margin-top: 6px;
}

/* Card icons por tipo */
.card-saldo .card-icon { background: var(--fundo-info); color: var(--info); }
.card-entradas .card-icon { background: var(--fundo-sucesso); color: var(--sucesso); }
.card-saidas .card-icon { background: var(--fundo-erro); color: var(--erro); }
.card-vencendo-hoje .card-icon { background: var(--fundo-atencao); color: var(--atencao); }
.card-vencendo-7d .card-icon { background: var(--fundo-info); color: var(--info); }
.card-atrasados .card-icon { background: var(--fundo-erro); color: var(--erro); }

.card-entradas .card-value { color: var(--sucesso); }
.card-saidas .card-value { color: var(--erro); }
.card-atrasados .card-value { color: var(--erro); }

/* Alerta piscante - vencimentos hoje */
.card-alert-pulse {
    animation: alertPulse 1.5s ease-in-out infinite;
    border: 2px solid var(--erro);
}

@keyframes alertPulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(192, 57, 43, 0.12),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
        border-color: var(--erro);
    }
    50% {
        box-shadow: 0 8px 32px rgba(192, 57, 43, 0.35),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
        border-color: rgba(192, 57, 43, 0.7);
    }
}

/* ============================================
   TABELAS - LIQUID GLASS
   ============================================ */

.table-container {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(10, 26, 58, 0.10),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(10, 26, 58, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

.table-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--azul-principal);
}

table.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table.table-premium thead th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--cinza-claro);
    text-align: left;
}

table.table-premium tbody td {
    padding: 14px 16px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    color: var(--cinza-escuro);
    border-bottom: 1px solid rgba(217, 222, 232, 0.5);
    vertical-align: middle;
}

table.table-premium tbody tr:hover {
    background: rgba(255, 255, 255, 0.4);
}

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

/* ============================================
   BOTOES
   ============================================ */

.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--azul-botao);
    color: var(--branco);
}

.btn-primary:hover {
    background: var(--azul-botao-hover);
    box-shadow: 0 4px 16px rgba(43, 95, 192, 0.3);
    color: var(--branco);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--cinza-escuro);
    border: 1px solid var(--cinza-claro);
}

.btn-secondary:hover {
    background: var(--branco);
}

.btn-danger {
    background: var(--fundo-erro);
    color: var(--erro);
}

.btn-danger:hover {
    background: var(--erro);
    color: var(--branco);
}

.btn-success {
    background: var(--fundo-sucesso);
    color: var(--sucesso);
}

.btn-success:hover {
    background: var(--sucesso);
    color: var(--branco);
}

/* ============================================
   BADGES DE STATUS
   ============================================ */

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-style: normal;
}

.badge-pendente {
    background: var(--fundo-atencao);
    color: var(--atencao);
}

.badge-recebido {
    background: var(--fundo-sucesso);
    color: var(--sucesso);
}

.badge-atrasado {
    background: var(--fundo-erro);
    color: var(--erro);
}

.badge-cancelado {
    background: var(--fundo-neutro);
    color: var(--cinza-medio);
}

/* ============================================
   MODAIS
   ============================================ */

.modal-premium .modal-content {
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.modal-premium .modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--cinza-claro);
}

.modal-premium .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--azul-principal);
}

.modal-premium .modal-body {
    padding: 24px 28px;
}

.modal-premium .modal-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid var(--cinza-claro);
}

/* ============================================
   CARD GLASS GENÉRICO (módulos)
   ============================================ */

.card-glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(10, 26, 58, 0.10),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ============================================
   BOTÃO GOLD
   ============================================ */

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--azul-principal);
    background: var(--dourado);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-gold:hover {
    background: var(--dourado-hover);
    box-shadow: 0 4px 16px rgba(200, 168, 75, 0.3);
    color: var(--azul-principal);
    transform: translateY(-1px);
}

.btn-gold:active {
    transform: translateY(0);
}

/* ============================================
   CARD CLICÁVEL (dashboard)
   ============================================ */

a.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

a.card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   SEMÁFORO DE RECEBÍVEIS
   ============================================ */

.semaforo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.semaforo-recebido { background: var(--sucesso); }
.semaforo-confirmado { background: #7C3AED; }
.semaforo-futuro { background: var(--cinza-claro); }
.semaforo-proximo { background: var(--atencao); }
.semaforo-hoje {
    background: var(--erro);
    animation: semaforoPulse 1.2s ease-in-out infinite;
}
.semaforo-atrasado { background: #8B1A1A; }
.semaforo-cancelado { background: var(--cinza-medio); opacity: 0.5; }

@keyframes semaforoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(192, 57, 43, 0); }
}

/* Badges do semáforo */
.badge-semaforo-recebido {
    background: var(--fundo-sucesso);
    color: var(--sucesso);
}

.badge-semaforo-confirmado {
    background: #EDE9FE;
    color: #7C3AED;
}

.badge-semaforo-futuro {
    background: var(--fundo-neutro);
    color: var(--cinza-medio);
}

.badge-semaforo-proximo {
    background: var(--fundo-atencao);
    color: var(--atencao);
}

.badge-semaforo-hoje {
    background: var(--fundo-erro);
    color: var(--erro);
    font-weight: 700;
    animation: badgeHojePulse 1.5s ease-in-out infinite;
}

@keyframes badgeHojePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(192, 57, 43, 0); }
}

.badge-semaforo-atrasado {
    background: #8B1A1A;
    color: #fff;
}

.badge-semaforo-cancelado {
    background: var(--fundo-neutro);
    color: var(--cinza-medio);
}

/* ============================================
   ENTRADAS - ÍCONE E VALORES
   ============================================ */

.entrada-icon-arrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--fundo-sucesso);
    color: var(--sucesso);
    display: flex;
    align-items: center;
    justify-content: center;
}

.valor-entrada {
    font-weight: 700;
    font-size: 15px;
    color: var(--sucesso);
}

/* Saídas */
.saida-icon-arrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--fundo-erro);
    color: var(--erro);
    display: flex;
    align-items: center;
    justify-content: center;
}

.valor-saida {
    font-weight: 700;
    font-size: 15px;
    color: var(--erro);
}

/* ============================================
   MODAL SALDO POR BANCO (Dashboard)
   ============================================ */

.saldo-banco-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 26, 58, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: saldoBancoFadeIn 0.25s ease;
}
@keyframes saldoBancoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.saldo-banco-modal {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 60px rgba(10, 26, 58, 0.18);
    width: 92%;
    max-width: 460px;
    animation: saldoBancoSlideUp 0.3s ease;
    overflow: hidden;
}
@keyframes saldoBancoSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.saldo-banco-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px 16px;
}
.saldo-banco-close {
    background: none;
    border: none;
    color: var(--cinza-medio);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}
.saldo-banco-close:hover {
    background: rgba(0,0,0,0.06);
    color: var(--cinza-escuro);
}
.saldo-banco-body {
    padding: 0 28px 8px;
}
.saldo-banco-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.saldo-banco-row:last-of-type {
    border-bottom: none;
}
.saldo-banco-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 8px;
    margin-top: 4px;
    border-top: 2px solid var(--cinza-claro);
}
.saldo-banco-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 4px;
    margin-top: 4px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}
.saldo-banco-footer {
    padding: 12px 28px 20px;
    text-align: center;
}
.saldo-banco-btn-fechar {
    background: var(--azul-principal);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 40px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    width: 100%;
}
.saldo-banco-btn-fechar:hover {
    background: var(--azul-complementar);
    color: #fff;
}

/* ============================================
   CARDS DE CONTAS BANCÁRIAS
   ============================================ */

.conta-card {
    border-left: 4px solid var(--cor-conta, #6c757d);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.conta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.conta-card-negativo {
    border-left-color: var(--erro) !important;
    box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.15);
}
.conta-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.conta-card-invest {
    border-left-color: #C8A84B !important;
}
.conta-mini-card {
    border-top: 3px solid var(--cor-conta, #6c757d);
    transition: transform 0.2s ease;
}
.conta-mini-card:hover {
    transform: translateY(-2px);
}

/* ============================================
   BADGE DE CONTA BANCÁRIA
   ============================================ */

.badge-banco {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.04);
    color: var(--cinza-escuro);
    white-space: nowrap;
}

.badge-banco-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cor-banco, #6c757d);
    flex-shrink: 0;
}

/* ============================================
   FAB — BOTÃO FLUTUANTE
   ============================================ */

.fab-nova-mov {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--dourado);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(200, 168, 75, 0.4);
    transition: all 0.25s ease;
}

.fab-nova-mov:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(200, 168, 75, 0.5);
}

.fab-nova-mov:active {
    transform: scale(1);
}

/* ============================================
   MODAL — MOVIMENTAÇÃO RÁPIDA
   ============================================ */

.mov-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 26, 58, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mov-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mov-modal {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 32px;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.mov-overlay.active .mov-modal {
    transform: translateY(0) scale(1);
}

.mov-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--cinza-medio);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.mov-close:hover {
    color: var(--erro);
}

.mov-header {
    text-align: center;
    margin-bottom: 28px;
}

.mov-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--azul-principal);
    margin-bottom: 4px;
}

.mov-header p {
    font-size: 13px;
    color: var(--cinza-medio);
    margin: 0;
}

/* Passo 1 — Tipo */
.mov-tipo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.mov-tipo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 20px;
    border-radius: 16px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.6);
}

.mov-tipo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.mov-tipo-btn.selected {
    border-color: var(--dourado);
    box-shadow: 0 0 0 3px rgba(200, 168, 75, 0.2);
}

.mov-tipo-entrada .mov-tipo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(43, 95, 192, 0.12);
    color: #2B5FC0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mov-tipo-entrada:hover .mov-tipo-icon,
.mov-tipo-entrada.selected .mov-tipo-icon {
    background: #2B5FC0;
    color: #fff;
}

.mov-tipo-saida .mov-tipo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mov-tipo-saida:hover .mov-tipo-icon,
.mov-tipo-saida.selected .mov-tipo-icon {
    background: #e74c3c;
    color: #fff;
}

.mov-tipo-transferencia .mov-tipo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(10, 26, 58, 0.12);
    color: #0A1A3A;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mov-tipo-transferencia:hover .mov-tipo-icon,
.mov-tipo-transferencia.selected .mov-tipo-icon {
    background: #0A1A3A;
    color: #fff;
}

.mov-tipo-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--azul-principal);
}

.mov-tipo-sub {
    font-size: 12px;
    color: var(--cinza-medio);
}

/* Passo 2 — Formulário */
.mov-step-hidden {
    display: none !important;
}

.mov-step {
    animation: movFadeIn 0.3s ease;
}

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

#movStep2 {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--cinza-claro);
}

.mov-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--cinza-claro);
}

.mov-btn-cancelar {
    background: none;
    border: none;
    color: var(--cinza-medio);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.2s;
}

.mov-btn-cancelar:hover {
    background: var(--fundo-neutro);
    color: var(--cinza-escuro);
}

.mov-btn-salvar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--dourado);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mov-btn-salvar:hover {
    background: var(--dourado-hover);
    box-shadow: 0 4px 16px rgba(200, 168, 75, 0.3);
}

.mov-btn-salvar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   TOAST DE NOTIFICAÇÃO
   ============================================ */

.mov-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    min-width: 300px;
}

.mov-toast.show {
    transform: translateX(0);
}

.mov-toast button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.7;
    color: inherit;
    line-height: 1;
}

.mov-toast-success {
    background: var(--fundo-sucesso);
    color: var(--sucesso);
    border: 1px solid rgba(31, 122, 77, 0.2);
}

.mov-toast-error {
    background: var(--fundo-erro);
    color: var(--erro);
    border: 1px solid rgba(192, 57, 43, 0.2);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--azul-principal);
    cursor: pointer;
    padding: 4px 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* ══════════════════════════════════════════
   DASHBOARD — CALENDÁRIO FINANCEIRO
   ══════════════════════════════════════════ */

.dash-calendario {
    padding: 12px 0;
    max-width: 100%;
    margin: 0 auto;
}

.dash-cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 6px;
}

.dash-cal-weekday {
    font-size: 12px;
    font-weight: 600;
    color: var(--cinza-medio);
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dash-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dash-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    color: var(--azul-principal);
    min-height: 48px;
    max-height: 60px;
    padding: 6px 4px;
}

.dash-cal-day:hover {
    background: var(--cinza-claro);
    transform: scale(1.05);
    color: var(--azul-principal);
}

.dash-cal-empty {
    cursor: default;
}

.dash-cal-empty:hover {
    background: transparent;
    transform: none;
}

.dash-cal-hoje {
    border: 2px solid var(--dourado);
    font-weight: 700;
    background: rgba(200, 168, 75, 0.08);
}

.dash-cal-num {
    font-size: 14px;
    line-height: 1;
}

.dash-cal-dots {
    display: flex;
    gap: 3px;
    margin-top: 3px;
}

.dash-cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dash-cal-dot.dot-entrada {
    background: var(--sucesso);
}

.dash-cal-dot.dot-saida {
    background: var(--erro);
}

.dash-cal-dot.dot-recebivel {
    background: var(--atencao);
}

.dash-cal-dot.dot-confirmado {
    background: #7C3AED;
}

.dash-cal-dot.dot-conta-pagar {
    background: #F97316;
}

.dash-cal-legenda {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--cinza-claro);
}

.dash-cal-legenda-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--cinza-medio);
}

/* Dia selecionado no calendário */
.dash-cal-selecionado {
    background: var(--azul-principal) !important;
    color: #fff !important;
}
.dash-cal-selecionado .dash-cal-num {
    color: #fff;
}
.dash-cal-selecionado:hover {
    color: #fff !important;
}

/* ═══ Painel Resumo do Dia ═══ */
.resumo-dia-secao {
    padding: 12px 16px;
    border-bottom: 1px solid var(--cinza-claro);
}
.resumo-dia-secao:last-child {
    border-bottom: none;
}
.resumo-dia-secao-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.resumo-dia-total {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
}
.resumo-dia-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    gap: 12px;
}
.resumo-dia-item + .resumo-dia-item {
    border-top: 1px solid rgba(0,0,0,0.05);
}
.resumo-dia-item-desc {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.resumo-dia-item-nome {
    font-size: 12px;
    font-weight: 600;
    color: var(--azul-principal);
    line-height: 1.3;
    word-break: break-word;
}
.resumo-dia-item-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--cinza-medio);
    background: var(--cinza-claro);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.resumo-dia-item-valor {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}
.resumo-dia-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 20px;
    flex: 1;
}
.resumo-dia-vazio p {
    margin: 12px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cinza-medio);
}
.resumo-dia-vazio span {
    font-size: 12px;
    color: var(--cinza-medio);
    opacity: 0.7;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-collapse-btn {
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .content-area {
        padding: 20px 16px;
    }

    .top-header {
        padding: 16px 20px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .summary-card {
        padding: 18px;
    }

    .summary-card .card-value {
        font-size: 22px;
    }

    .header-date {
        display: none;
    }

    .top-header h1 {
        font-size: 18px;
    }

    /* Charts: 1 column on tablet */
    .row > .col-lg-7,
    .row > .col-lg-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* ── Top Header ── */
    .top-header {
        padding: 14px 16px;
        gap: 8px;
    }

    .top-header h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }

    .top-header .header-logo img {
        width: 80px;
    }

    .header-date {
        display: none;
    }

    /* ── Content ── */
    .content-area {
        padding: 16px 12px;
    }

    /* ── KPI Cards ── */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .summary-card {
        padding: 16px;
        border-radius: 16px;
    }

    .summary-card .card-value {
        font-size: 20px;
    }

    .summary-card .card-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 12px;
    }

    /* ── Tabelas ── */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th,
    .table td,
    table.table-premium thead th,
    table.table-premium tbody td {
        font-size: 13px;
        padding: 10px 8px;
        white-space: nowrap;
    }

    /* Esconder colunas menos importantes em tablet */
    .table .col-hide-tablet {
        display: none;
    }

    /* ── Filtros ── */
    .card-glass .d-flex.flex-wrap {
        flex-direction: column;
    }

    .card-glass .d-flex.flex-wrap .form-select,
    .card-glass .d-flex.flex-wrap .form-control,
    .card-glass .d-flex.flex-wrap > div {
        min-width: 100% !important;
        width: 100% !important;
    }

    .card-glass .d-flex.flex-wrap .btn {
        flex: 1;
    }

    /* ── Gráficos ── */
    canvas {
        max-width: 100%;
        height: auto !important;
    }

    .card-glass canvas {
        max-height: 280px;
    }

    /* ── Modal Movimentação Rápida ── */
    .mov-modal {
        padding: 24px 16px;
        max-width: 95vw;
    }

    .mov-tipo-btn {
        padding: 18px 10px;
    }

    .mov-tipo-icon {
        width: 44px !important;
        height: 44px !important;
    }

    .mov-tipo-label {
        font-size: 13px;
    }

    .mov-tipo-sub {
        font-size: 11px;
    }

    /* ── Formulários ── */
    .row.g-3 > [class*="col-md"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .form-control,
    .form-select {
        font-size: 16px !important; /* Evita zoom no iOS */
    }

    /* ── Botões de ação ── */
    .d-flex.gap-2.mt-4 {
        flex-direction: column;
    }

    .d-flex.gap-2.mt-4 .btn {
        width: 100%;
    }

    /* ── Cards de contas bancárias ── */
    .conta-card {
        border-radius: 16px;
    }

    /* ── Badges ── */
    .badge-banco {
        font-size: 11px;
        padding: 3px 8px;
    }

    /* ── Saldo por banco modal ── */
    .saldo-banco-modal {
        width: 95%;
        max-width: 95vw;
    }

    .saldo-banco-header {
        padding: 20px 20px 12px;
    }

    .saldo-banco-body {
        padding: 0 20px 8px;
    }

    .saldo-banco-footer {
        padding: 12px 20px 16px;
    }

    /* ── Relatórios ── */
    .nav-pills {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
    }

    .nav-pills .nav-link {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 14px;
    }

    /* ── Login ajustes ── */
    .login-logo img {
        width: 140px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .form-control-custom {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

@media (max-width: 576px) {
    /* ── Calendário Dashboard ── */
    .dash-cal-day {
        min-height: 36px;
        border-radius: 6px;
    }

    .dash-cal-num {
        font-size: 12px;
    }

    .dash-cal-dot {
        width: 4px;
        height: 4px;
    }

    .dash-cal-weekday {
        font-size: 10px;
    }

    .dash-cal-legenda {
        gap: 10px;
    }

    .dash-cal-legenda-item {
        font-size: 11px;
    }

    /* ── KPI Cards: 1 coluna ── */
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .summary-card .card-value {
        font-size: 18px;
    }

    .summary-card .card-label {
        font-size: 12px;
    }

    /* ── Top Header ── */
    .top-header {
        padding: 10px 12px;
    }

    .top-header h1 {
        font-size: 15px;
        max-width: 140px;
    }

    .top-header .header-logo img {
        width: 70px;
    }

    .top-header .header-left {
        gap: 10px;
    }

    /* ── Content ── */
    .content-area {
        padding: 12px 8px;
    }

    /* ── Tabelas ── */
    .table th,
    .table td,
    table.table-premium thead th,
    table.table-premium tbody td {
        font-size: 12px;
        padding: 8px 6px;
    }

    /* Esconder mais colunas em mobile */
    .table .col-hide-mobile {
        display: none;
    }

    /* ── Filtros empilhados ── */
    .d-flex.gap-2.flex-wrap {
        flex-direction: column;
        gap: 8px !important;
    }

    .d-flex.gap-2.flex-wrap > div,
    .d-flex.gap-2.flex-wrap .form-select,
    .d-flex.gap-2.flex-wrap .form-control {
        width: 100% !important;
        min-width: 100% !important;
    }

    .d-flex.gap-2.flex-wrap .btn,
    .d-flex.gap-2.flex-wrap > a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Botões filtrar/limpar lado a lado */
    .d-flex.gap-2.flex-wrap > button[type="submit"],
    .d-flex.gap-2.flex-wrap > a.btn-outline-secondary {
        flex: 1;
        min-width: 0 !important;
        width: auto !important;
    }

    /* ── Gráficos menores ── */
    .card-glass canvas {
        max-height: 220px;
    }

    /* ── FAB: vira círculo ── */
    .fab-nova-mov span {
        display: none;
    }

    .fab-nova-mov {
        padding: 16px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
        bottom: 20px;
        right: 20px;
    }

    /* ── Modal Movimentação Rápida ── */
    .mov-overlay {
        padding: 8px;
    }

    .mov-modal {
        padding: 20px 14px;
        border-radius: 16px;
        max-height: 92vh;
    }

    .mov-header h2 {
        font-size: 18px;
    }

    .mov-header {
        margin-bottom: 16px;
    }

    .mov-tipo-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .mov-tipo-btn {
        padding: 14px 6px;
        gap: 6px;
    }

    .mov-tipo-icon {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
    }

    .mov-tipo-label {
        font-size: 12px;
    }

    .mov-tipo-sub {
        display: none;
    }

    .mov-actions {
        flex-direction: column;
        gap: 8px;
    }

    .mov-btn-cancelar,
    .mov-btn-salvar {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* ── Modal de exclusão ── */
    .modal-dialog {
        margin: 16px;
        max-width: calc(100vw - 32px);
    }

    .modal-content {
        border-radius: 16px;
    }

    .modal-header {
        padding: 16px 20px 12px;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .modal-footer {
        padding: 12px 20px 16px;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1;
    }

    /* ── Toast ── */
    .mov-toast {
        min-width: auto;
        max-width: calc(100vw - 32px);
        font-size: 13px;
    }

    .toast-notification {
        left: 16px;
        right: 16px;
        max-width: none;
    }

    /* ── Login ── */
    .login-card {
        padding: 24px 20px;
    }

    .login-logo img {
        width: 130px;
    }

    .login-logo {
        margin-bottom: 28px;
    }

    /* ── Cards de conta ── */
    .conta-card {
        padding: 16px !important;
    }

    /* ── Saldo banco modal ── */
    .saldo-banco-modal {
        width: 98%;
        border-radius: 16px;
    }

    .saldo-banco-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* ── Recebíveis cards resumo ── */
    .d-flex.gap-3.mb-4 > .card-glass {
        flex: 1 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    /* ── Relatórios botões exportar ── */
    .btn-group-export {
        flex-direction: column;
        width: 100%;
    }

    .btn-group-export .btn {
        width: 100%;
    }

    /* ── Card glass ajustes ── */
    .card-glass {
        border-radius: 16px;
    }

    .card-glass.p-4 {
        padding: 16px !important;
    }

    .card-glass.p-3 {
        padding: 12px !important;
    }

    /* ── Clientes visualizar/extrato ── */
    .d-flex.gap-4 {
        flex-direction: column;
        gap: 16px !important;
    }

    /* ── Integrações Asaas ── */
    .input-group {
        flex-direction: column;
    }

    .input-group .form-control,
    .input-group .btn {
        border-radius: 12px !important;
        width: 100%;
    }

    .input-group .btn {
        margin-top: 8px;
    }

    /* ── Toque mínimo 44px ── */
    .btn-sm {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item {
        min-height: 44px;
    }

    /* ── Filtros: total card inline ── */
    .card-glass.d-inline-flex {
        display: flex !important;
        width: 100%;
    }
}

@media (max-width: 400px) {
    /* ── Ultra pequeno (iPhone SE, etc) ── */
    .top-header h1 {
        font-size: 14px;
        max-width: 110px;
    }

    .top-header .header-logo img {
        width: 60px;
    }

    .top-header .header-left {
        gap: 8px;
    }

    .sidebar-toggle svg {
        width: 20px;
        height: 20px;
    }

    .content-area {
        padding: 10px 6px;
    }

    .summary-card {
        padding: 12px;
    }

    .summary-card .card-value {
        font-size: 16px;
    }

    .summary-card .card-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .summary-card .card-icon svg {
        width: 16px;
        height: 16px;
    }

    .table th,
    .table td,
    table.table-premium thead th,
    table.table-premium tbody td {
        font-size: 11px;
        padding: 6px 4px;
    }

    .mov-tipo-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 4px;
    }

    .mov-tipo-btn {
        padding: 10px 4px;
        gap: 4px;
    }

    .mov-tipo-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .mov-tipo-label {
        font-size: 11px;
    }

    .mov-modal {
        padding: 16px 10px;
    }

    .mov-header h2 {
        font-size: 16px;
    }

    .card-glass.p-4 {
        padding: 12px !important;
    }

    .login-card {
        padding: 20px 16px;
    }

    .login-logo img {
        width: 110px;
    }

    .btn-gold,
    .btn-premium {
        font-size: 13px;
        padding: 10px 16px;
    }

    /* Badges menores */
    .badge-status {
        font-size: 10px;
        padding: 3px 8px;
    }

    .badge-banco {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: calc(100vw - 48px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.toast-success {
    background: var(--fundo-sucesso);
    color: var(--sucesso);
    border: 1px solid rgba(31,122,77,0.15);
}

.toast-notification.toast-error {
    background: var(--fundo-erro);
    color: var(--erro);
    border: 1px solid rgba(192,57,43,0.15);
}

.toast-notification.toast-warning {
    background: var(--fundo-atencao);
    color: var(--atencao);
    border: 1px solid rgba(183,121,31,0.15);
}

.toast-notification.toast-info {
    background: var(--fundo-info);
    color: var(--info);
    border: 1px solid rgba(37,99,235,0.15);
}
