/* =========================
   VARIÁVEIS
========================= */
:root {
    --primary-color: #2c5aa0;
    --primary-dark: #1e3f73;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;

    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    --border-radius: 8px;
    --border-radius-lg: 12px;

    --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);

    --transition: all 0.3s ease;

    --govbr-blue: #1351b4;
    --govbr-green: #168821;
    --govbr-yellow: #ffcd07;
}

/* =========================
   BASE
========================= */
body {
    font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-700);
    line-height: 1.5;
}

/* =========================
   HEADER
========================= */
.page-header {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin: 1rem 0 2rem;
    border-left: 4px solid var(--primary-color);
}

/* =========================
   TITULO RESPONSIVO
========================= */
.TituloPagina {
    font-size: 3vw;
    padding-top: 10px;
}

@media (min-width: 1200px) {
    .TituloPagina {
        font-size: 30px;
    }
}

/* =========================
   BOTÕES
========================= */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Remove spinner antigo (CONFLITO RESOLVIDO) */
.btn::after {
    display: none !important;
}

/* BOTÃO PRIMARY */
.btn-primary {
    position: relative;
    overflow: hidden;
}

/* Spinner centralizado */
.btn-primary .spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    pointer-events: none;
    display: none;
}

/* Estado loading */
.btn.loading {
    pointer-events: none;
    opacity: 0.75;
}

.btn-primary.loading .spinner {
    display: flex;
}

.btn-primary.loading .btn-content {
    opacity: 0;
}

.btn-primary.loading {
    cursor: wait;
}

/* =========================
   SPINNER (fallback bootstrap-like)
========================= */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border: 0.125em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.125em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* =========================
   DATATABLES AJUSTES
========================= */
.dataTables_wrapper td:before {
    margin-left: 20px;
    text-align: left;
}

.dataTables_wrapper td {
    text-align: left;
}

.dataTables_wrapper .child {
    max-width: 100%;
}

.dataTables_wrapper table.dataTable tbody td {
    text-align: left;
    padding-left: 30px !important;
}

.dataTables_filter input[type="search"] {
    padding-left: 25px !important;
}

/* =========================
   ANIMAÇÕES
========================= */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .login-title {
        font-size: 1.8rem;
    }
}

/* =========================
   OVERLAY
========================= */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border-radius: 0 0 0 10px;
}

.text {
    margin: 0;
}

.finalMandato {
    background-color: black;
    color: white;
    padding: 3px;
}