/* Estilos simples para as páginas do app Sicoob.
   Aproveita a base/tailwind já carregada em base.html. */

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.page-subtitle {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.card-body {
    padding: 1rem 1.25rem;
}

.form-select {
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-error {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Coluna de info complementar mais estreita para não quebrar o valor */
.info-complementar-col {
    max-width: 420px;
    width: 420px;
    word-break: break-word;
}

/* Cores de valor por tipo de lançamento */
.valor-debito {
    color: #dc2626; /* vermelho */
    font-weight: 600;
}

.valor-credito {
    color: #16a34a; /* verde */
    font-weight: 600;
}

/* ============================================
   LAYOUT DOS BOTÕES DE AÇÕES (EXTRATO)
   ============================================ */

.sicoob-actions-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.sicoob-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sicoob-bottom-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.sicoob-periodo-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.75rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    flex: 1;
    min-width: 300px;
}

.sicoob-filter-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.75rem;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
}

.separator-text {
    color: #9ca3af;
    font-size: 0.875rem;
    padding-bottom: 0.5rem;
}

.btn-sicoob {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
    white-space: nowrap;
}

.btn-sicoob:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4191 100%);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

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

.btn-sicoob svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.btn-sicoob-period {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 4px rgba(240, 147, 251, 0.2);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-sicoob-period:hover {
    background: linear-gradient(135deg, #e082ea 0%, #e4465b 100%);
    box-shadow: 0 4px 8px rgba(240, 147, 251, 0.3);
}

.form-label-inline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.label-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.input-date {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
    min-width: 140px;
}

.input-date:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Melhorar aparência do input month */
.input-date[type="month"] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.input-date[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: brightness(0) saturate(100%) invert(35%) sepia(98%) saturate(1661%) hue-rotate(224deg) brightness(94%) contrast(91%);
}

.btn-clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: #dc2626;
    background-color: #ffffff;
    border: 1px solid #fca5a5;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.btn-clear-filter:hover {
    background-color: #fee2e2;
    border-color: #dc2626;
}

/* Responsivo */
@media (max-width: 1024px) {
    .sicoob-actions-container {
        width: 100%;
    }

    .sicoob-actions-row {
        width: 100%;
    }

    .btn-sicoob {
        flex: 1;
        justify-content: center;
        min-width: 160px;
    }

    .sicoob-bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sicoob-periodo-form {
        width: 100%;
        min-width: auto;
    }

    .sicoob-filter-form {
        width: 100%;
    }
}

/* ============================================
   PAGINAÇÃO
   ============================================ */

.pagination-bar {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pagination-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #667eea;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background-color: #f3f4f6;
    border-color: #667eea;
}

.pagination-link.disabled {
    color: #9ca3af;
    background-color: #f9fafb;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-current {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
}

@media (max-width: 640px) {
    .pagination-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-links {
        justify-content: center;
    }
}
