/* =======================================================
   GERABOI • THEME CSS REFATORADO
   – Inclui melhorias UI/UX: fontes fluídas, transições globais,
     redução de repetição, acessibilidade, performance etc.
======================================================= */

/* =======================================================
   PALETA / TOKENS
======================================================= */
:root {
    --cor-areia: #fcefd3;
    --cor-bege-medio: #d1bba3;
    --cor-bege-areia: #b79973;
    --cor-terracota: #bd6942;
    --cor-esmeralda-escuro: #143236;
    --cor-esmeralda-claro: #264a50;
    --cor-cinza-light: #f2f2f2;
    --cor-cinza-medio: #e5e5e5;
    --cor-cinza-claro: #d9d9d9;
    --cor-cinza-escuro: #999999;
    --cor-cinza-dark: #333333;
    --cor-cinza-darker: #111111;
    --cor-cinza-darkest: #000000;
    --cor-preto: #000000;
    --cor-branco: #ffffff;
    --cor-verde-claro: #009980;
    --cor-verde-escuro: #006666;

    /* Tokens semânticos / compatibilidade com componentes legados */
    --primary-color: var(--cor-esmeralda-escuro);
    --secondary-dark: var(--cor-esmeralda-claro);
    --accent-dark: #145c32;
    --highlight: var(--cor-terracota);
    --color-default: var(--text-dark);
    --color-blue: #0d6efd;
    --blue-dark: #0b5ed7;
    --color-green: #198754;
    --green-light: #20a06b;
    --green-medium: #198754;
    --yellow-light: #ffc107;
    --yellow-medium: #e0a800;
    --yellow-dark: #997404;
    --red-light: #dc3545;
    --red-medium: #bb2d3b;
    --white: #ffffff;
    --weight-bold: 600;

    --background-white: #ffffff;

    --text-dark: #143236;
    --text-light: #fcefd3;
    --text-muted: #777777;
    --text-disabled: #999999;
    --text-placeholder: #999999;
    --text-gray: #777777;
    --text-gray-light: #999999;
    --text-gray-lighter: #cccccc;
    --text-gray-lightest: #eeeeee;
    --text-gray-dark: #333333;
    --text-gray-darker: #111111;
    --text-gray-darkest: #000000;

    --border-radius: 10px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    --fs-small: clamp(0.85rem, 2vw, 1rem);
    --fs-base: clamp(1rem, 2.5vw, 1.2rem);
    --fs-medium: clamp(1.2rem, 3vw, 1.4rem);
    --fs-large: clamp(1.5rem, 4vw, 2rem);

    /* ========== RAIO DE BORDA ========== */
    --radius-sm: 6px;
    --radius-medium: 8px;
    --radius: 12px;
    --radius-large: 12px;
    /* compatível com --radius */
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* ========== SOMBRAS ========== */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 3px 8px rgba(0, 0, 0, 0.04);
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.12);

    /* ========== TRANSIÇÕES ========== */
    --transition-fast: 0.2s ease-in-out;
    --transition-base: 0.3s ease;

    /* ========== OPACIDADES ========== */
    --opacity-50: 0.5;
    --opacity-75: 0.75;
    --opacity-disabled: 0.4;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0 !important;
    font-family: "Inter", sans-serif;
    background: #eeece9 !important;
    color: var(--text-dark);
    line-height: 1.5;
    padding: 0;
}

main {
    margin-top: 15px;
}

img {
    max-width: 100%;
    display: block;
}

/* Links genéricos */
a {
    color: inherit;
    text-decoration: none !important;
}

a:hover {
    text-decoration: none !important;
}

/* ===== Títulos ===== */
h1,
h2,
h3,
h4 {
    color: var(--text-dark);
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Reduz movimento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Foco acessível */
:focus-visible {
    outline: 2px solid var(--text-dark);
    outline-offset: 2px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

/* Avatar dropdown */
.user-dropdown {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #fff;
}

.user-dropdown:focus {
    outline: none;
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: -8px;
    box-shadow: var(--shadow-xs);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease;
}

.user-avatar-mini:hover {
    transform: scale(1.05);
}

/* Relógio mais clean */
.dashboard-datetime {
    font-size: 0.8rem;
    line-height: 1.2;
    color: #fff;
    text-align: right;
}

.dashboard-datetime #currentDate {
    font-weight: 500;
    opacity: 0.8;
}

.dashboard-datetime #currentTime {
    font-family: "Roboto Mono", monospace;
    font-weight: 700;
    font-size: 1rem;
    color: var(--cor-terracota);
}

/* ----------- CONTAINER ----------- */
.container-header {
    max-width: 1280px;
    width: 100%;
    margin: 10px auto;
}

/* ----------- HEADER PRINCIPAL ----------- */
.app-header {
    background: var(--cor-esmeralda-escuro);
    width: 100%;
    position: sticky !important;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

/* Por padrão: mostra desktop, esconde mobile */
.logo-desktop {
    display: block;
}

.logo-mobile {
    display: none;
}

.logo-desktop {
    width: 250px;
    height: auto;
}

.logo-mobile {
    width: 155px;
    height: auto;
}

.bg-header {
    background: var(--cor-esmeralda-escuro);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    flex-shrink: 0;
}

.header-right {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ----------- LOGO ----------- */
.app-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    color: var(--text-light);
    text-decoration: none;
    max-width: 100%;
    height: auto;
}

/* ----------- MENU ----------- */
.app-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease, transform 0.2s ease;
}

.app-link i {
    width: 22px;
    height: 22px;
}

.app-link:hover {
    color: var(--cor-terracota);
    transform: scale(1.1);
}

.app-link.active {
    color: var(--cor-terracota);
}

.app-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
}

/* ----------- MEGA MENU CENTRAL ----------- */

.mega-dropdown.centered {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 50%;
    width: 100%;
    max-width: 1282px;
    padding: 2rem;
    background: var(--cor-bege-medio);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease-in-out;
}

.mega-menu-center:hover .mega-dropdown.centered {
    opacity: 1;
    pointer-events: auto;
}

.mega-column h4 {
    font-size: 1rem;
    color: var(--cor-esmeralda-escuro);
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.mega-column a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    padding: 0.4rem 0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mega-column a:hover {
    color: var(--cor-terracota);
}

/* ============================================================
🔘 BOTÃO MENU MOBILE (HAMBURGUER)
============================================================ */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--cor-terracota);
    outline-offset: 2px;
}

/* ☰ Icon bars */
.menu-toggle .bars {
    width: 20px;
    height: 14px;
    position: relative;
}

.menu-toggle .bars::before,
.menu-toggle .bars::after,
.menu-toggle .bars span {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.menu-toggle .bars::before {
    top: 0;
}

.menu-toggle .bars span {
    top: 6px;
}

.menu-toggle .bars::after {
    top: 12px;
}

/* ✖ Transformação para estado ativo */
.menu-toggle[aria-expanded="true"] .bars::before {
    transform: rotate(45deg);
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .bars::after {
    transform: rotate(-45deg);
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .bars span {
    opacity: 0;
}

/* 💧 Clique com efeito ripple */
.menu-toggle:active::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    from {
        transform: scale(0.5);
        opacity: 1;
    }

    to {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ============================================================
📱 OFFCANVAS MENU MOBILE
============================================================ */

.custom-offcanvas {
    background-color: var(--cor-esmeralda-escuro) !important;
    width: 300px;
}

.offcanvas-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.offcanvas-header h5 {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

.offcanvas-body {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 1rem 1.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Títulos das seções */
.offcanvas-body h6 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    letter-spacing: 0.3px;
}

/* Separador entre seções */
.offcanvas-body > section:not(:first-of-type) {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Scrollbar personalizada */
.offcanvas-body::-webkit-scrollbar {
    width: 6px;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: transparent;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.offcanvas-body:hover::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
🎯 ÍCONES DO MENU MOBILE
============================================================ */

/* Ícones do menu mobile */
.menu-icon-item {
    text-align: center;
    text-decoration: none;
    color: white;
    width: 66px;
    flex: 0 0 auto;
    animation: fadeInUp 0.25s ease-in-out;
    transition: transform 0.2s ease;
}

.menu-icon-item small {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
}

.icon-circle {
    background: linear-gradient(135deg, #6b3f1d, #8c5128);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Hover */
.icon-circle:hover {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Clique (efeito "pressionado") */
.icon-circle:active {
    transform: scale(0.92);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) inset;
}

/* Ícone interno */
.icon-circle i,
.icon-circle img {
    width: 24px;
    height: 24px;
    color: white;
    object-fit: contain;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Destacar ícone ativo (ex: página atual) */
.menu-icon-item.active .icon-circle {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.6);
}

.menu-icon-item.active small {
    color: #ffcc80;
}

/* Animação de entrada */
@keyframes fadeInUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
👤 BLOCO USUÁRIO (final do menu)
============================================================ */

.offcanvas-user {
    background-color: #112e33;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.username {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
}

/* Botão Sair moderno (Offcanvas Mobile) */
.btn-logout {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 10px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* Hover/Focus */
.btn-logout:hover,
.btn-logout:focus-visible {
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0.05)
    ) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Active/Click */
.btn-logout:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ============================================================
📋 DROPDOWN DESKTOP (antigo)
============================================================ */

.app-menu {
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.5rem);
    width: 220px;
    padding: 0.5rem;
    border-radius: 22px;
    background: var(--cor-esmeralda-escuro);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    transform: scale(0.98) translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.app-menu.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
}

/* =========================== ACESSIBILIDADE =========================== */
.app-link:focus-visible,
.menu-item:focus-visible,
.menu-toggle:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 2px;
}

/* ====== ESTILO EXCLUSIVO PARA ICON CARDS ====== */
.icon-card-style {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
}

.icon-card-style:hover {
    background-color: #f0f8ff;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.icon-card-style a {
    color: #333;
    text-decoration: none;
}

.icon-card-style i.lucide-icon {
    width: 40px;
    height: 40px;
    stroke: #0d6efd;
    transition: stroke 0.3s;
}

.icon-card-style:hover i.lucide-icon {
    stroke: #0a58ca;
}

.access-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

/**
Botões
 */

.button-primary,
.btn.button-primary {
    background-color: var(--cor-bege-medio);
    color: var(--cor-esmeralda-escuro);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.05s ease;
}

.button-primary:hover,
.btn.button-primary:hover {
    opacity: 0.8;
}

.button-primary:active {
    transform: translateY(1px);
}

/* === SECUNDÁRIO === */
.button-secondary,
.btn.button-secondary {
    background: var(--cor-bege-areia);
    color: var(--text-dark);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease, color 0.3s ease;
}

.button-secondary:hover {
    background: #9f825d;
    color: var(--text-light);
}

/* === SUCESSO === */
.button-success,
.btn.button-success {
    background: var(--cor-esmeralda-escuro);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease, color 0.3s ease;
}

.button-success:hover {
    background: #0b1f22;
    color: var(--text-light);
}

/* === INFORMAÇÃO === */
.button-info,
.btn.button-info {
    background: var(--color-blue);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease, color 0.3s ease;
}

.button-info:hover {
    background: var(--blue-dark);
}

/* === AVISO === */
.button-warning,
.btn.button-warning {
    background: var(--yellow-light);
    color: var(--text-dark);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease, color 0.3s ease;
}

.button-warning:hover {
    background: var(--yellow-medium);
}

/* === PERIGO === */
.button-danger,
.btn.button-danger {
    background: var(--red-light);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease, color 0.3s ease;
}

.button-danger:hover {
    background: var(--red-medium);
}

/* ===================== BOTÕES OUTLINE ===================== */

.button-outline-primary,
.btn.button-outline-primary {
    background: transparent;
    color: var(--cor-esmeralda-escuro);
    border: 1px solid var(--cor-esmeralda-escuro);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: all 0.3s ease;
}

.button-outline-primary:hover {
    background: var(--cor-cinza-medio);
    color: var(--cor-esmeralda-escuro);
}

.button-outline-secondary,
.btn.button-outline-secondary {
    color: var(--text-dark);
    border: 1px solid var(--cor-esmeralda-escuro);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    transition: all 0.3s ease;
}

.button-outline-secondary:hover {
    background: var(--cor-cinza-light) !important;
    border: 1px solid #13808f !important;
    color: #00c5b8 !important;
}

.button-outline-eyes {
    color: var(--text-dark);

    padding: 5px 12px;

    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.3s ease;
}

.button-outline-success,
.btn.button-outline-success {
    background: transparent;
    color: var(--green-light);
    border: 1px solid var(--green-light);
}

.button-outline-success:hover {
    background: var(--green-light);
    color: var(--text-dark);
}

.button-outline-info,
.btn.button-outline-info {
    background: transparent;
    color: var(--color-blue);
    border: 1px solid var(--color-blue);
}

.button-outline-info:hover {
    background: var(--color-blue) !important;
    color: var(--white) !important;
}

.button-outline-warning,
.btn.button-outline-warning {
    background: transparent;
    color: var(--yellow-dark);
    border: 1px solid var(--yellow-dark);
}

.button-outline-warning:hover {
    background: var(--yellow-light);
    color: var(--text-dark);
}

.button-outline-danger,
.btn.button-outline-danger {
    background: transparent;
    color: var(--red-medium);
    border: 1px solid var(--red-medium);
}

.button-outline-danger:hover {
    background: var(--red-medium);
    color: var(--white);
}

/* ======================================================= CONTAINERS / CONTENT ======================================================= */

.dashboard-content {
    background: var(--background-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

/**
Pastagens
 */
.pastagem_card {
    background: #fff;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pastagem_card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    cursor: pointer;
}

.pastagem_icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at top left, #ffffff, #e9e9e9);
    display: flex;
    color: #570505;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.pastagem_body {
    padding: 10px;
}

.pastagem_body:hover {
    background: #f8f9fa;
}

.pastagem_footer {
    background: var(--cor-bege-medio) !important;
}

/* ======================================================= CARDS ======================================================= */

.card {
    border-radius: var(--radius);
    background: var(--background-white);
    padding: 20px;
    text-align: center;
    border: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-label,
.access-title {
    margin-top: 6px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
}

.access-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 16px;
    justify-content: center;
}

.badge-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    border-radius: 999px;
    background: var(--cor-esmeralda-escuro);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/**
CARDS INDEX
 */
/* Título da página */
.index-divisoes {
    flex-direction: row;
    display: flex;
}

.page-title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: var(--text-dark);
}

.page-subtitle {
    font-size: clamp(1rem, 1.3vw, 1.9rem);
    font-weight: 700;
    color: var(--text-dark);
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Card Base */
.dashboard-card {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Header */
/* ==== CARDS WRAPPER ==== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ==== CARD CONTAINER ==== */
.dashboard-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==== CARD HEADER ==== */
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 12px !important;
}

.card-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-default);
    margin-bottom: 10px;
}

/* ==== CARD CONTENT ==== */
.card-content {
    flex: 1;
    padding-bottom: 10px;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--color-default);
    margin-bottom: 6px;
}

.card-content strong {
    color: var(--color-green);
}

/* ==== CARD FOOTER ==== */
.card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-link {
    color: var(--color-blue);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: var(--green-medium);
}

.text-muted {
    color: #888;
}
/* Grid de cards */
.rebanho-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) ;
    gap: 1rem;
}

/* Container de cada card */
.rebanho-card-container {
    width: 100% !important;
    display: flex;
    padding: 0;
}

/* Card */
.rebanho-card {
    background-color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    width: 300px;
}

.rebanho-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Linha superior decorativa */
.rebanho-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--cor-esmeralda-escuro), var(--cor-terracota));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Cabeçalho */
.rebanho-card-header {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--cor-cinza-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.rebanho-title {
    font-size: var(--fs-medium);
    font-weight: 700;
    color: var(--cor-esmeralda-escuro);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Grupo de informações */
.rebanho-info-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: var(--fs-small);
    color: var(--text-dark);
    opacity: 0.9;
    margin-top: 0.5rem;
}

.rebanho-info-item strong {
    font-weight: 700;
    color: var(--cor-esmeralda-escuro);
}

/* Corpo */
.rebanho-card-body {
    padding: 0.75rem 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rebanho-chart {
    width: 100%;
    max-height: 160px;
}

/* Rodapé */
.rebanho-card-footer {
    margin-top: auto;
    background: var(--cor-esmeralda-escuro);
    padding: 0.75rem;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transition: background 0.3s ease;
}

.rebanho-card-footer:hover {
    background: var(--cor-terracota);
}

.rebanho-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    font-size: var(--fs-small);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.rebanho-footer-link:hover {
    opacity: 0.85;
}

/* Card vazio (sem rebanho) */
.rebanho-card.empty {
    background: #fff9e6;
    border: 1px dashed #ffc107;
    box-shadow: none;
}

.rebanho-card.empty .rebanho-title {
    color: #856404;
}

.rebanho-card.empty p {
    font-size: var(--fs-small);
    color: #856404;
    margin: 0;
}


/* ================ CARDS - PASTAGENS =========================== */
.card-pastagem {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.card-pastagem:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pastagem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.title-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #d4dce1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s ease, border 0.2s ease;
    text-decoration: none;
}

.edit-btn:hover {
    background-color: #dcefe2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-id {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.card-id span {
    font-weight: 600;
    color: #333;
}

.card-pastagem {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.card-pastagem:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pastagem-rebanho-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.badge-area {
    background-color: #d1f3e0;
    color: #1c7c4d;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
}

.categoria-info {
    background-color: #f9fafb;
    border-left: 4px solid #198754;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    box-shadow: inset 0 0 0 1px #e0e0e0;
}

.categoria-info p {
    margin: 0;
    line-height: 1.4;
}

.fazenda-card {
    background: #fff;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fazenda-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    cursor: pointer;
}

/* Badge */
.fazenda-badge {
    top: 4px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 999px;
    color: #fff;
    background: #034b45;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Corpo */
.fazenda-card-body {
    padding: 28px 20px 18px;
    text-align: center;
    border: none;
    /* <- Removido o border */
    border-radius: 0;
    /* <- Removido o border-radius */
    background: transparent;
    /* <- Deixa o fundo limpo */
}

.fazenda-card-body:hover {
    background: #f7f7f7;
}

/* Icone */
.fazenda-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle at top left, #ffffff, #e9e9e9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.fazenda-icon:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.fazenda-card:hover .fazenda-icon {
    transform: scale(1.05);
}

/* Títulos */
.fazenda-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.fazenda-subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

/* Info */
.fazenda-info {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

/* Footer */
.fazenda-card-footer {
    padding: 12px 10px;
    background: var(--cor-bege-areia);
    display: flex;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.fazenda-card-footer:hover {
    background: var(--cor-bege-medio);
}

/* Botões de ação */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    color: var(--text-dark);
    position: relative;
}

.btn-action:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.btn-action i,
.btn-action img {
    width: 22px;
    height: 22px;
}

/* Tooltip */
.btn-action::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    background: #333;
    color: #fff !important;
    font-size: 0.7rem;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.btn-action:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================================= CARDS — REBANHO ======================================================= */

/* Card de Origem com fundo diferenciado */

.card-adicionar-rebanho,
.card-retirar-rebanho,
.card-transferir-rebanho {
    background: var(--background-white);
    border: 1px solid #e2e2e2;
    border-top-width: 5px;
    border-radius: var(--radius-lg);
    text-align: center;
    padding: 32px 20px;
    position: relative;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--shadow-sm);
}

.quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-origem {
    background: #cccbb8 !important;
    /* verde bem suave */
    border-left: 4px solid #198754;
    font-size: 1.1rem;
    text-align: left;
}

.card-origem .card-title {
    color: #198754;
    font-weight: 600;
    font-size: 2rem;
}

.badge-entrada {
    background-color: #28a745;
}

.badge-saida {
    background-color: #dc3545;
}

.badge-transferencia {
    background-color: #ffc107;
    color: #1f1f1f;
}

.badge-venda {
    background-color: #0d6efd;
}

.badge-obito {
    background-color: #212529;
}

.badge-outros {
    background-color: #6c757d;
}

.card-entrada {
    border-top-color: #28a745;
}

.card-saida {
    border-top-color: #dc3545;
}

.card-transferencia {
    border-top-color: #ffc107;
}

.card-movimentacao {
    border-top-color: #0dcaf0;
}

.card-entrada:hover {
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.2);
}

.card-saida:hover {
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.2);
}

.card-transferencia:hover {
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.2);
}

.card-movimentacao:hover {
    box-shadow: 0 8px 20px rgba(13, 202, 240, 0.2);
}

#peso[readonly] {
    background: #f8f9fa;
    color: #6c757d;
}

/**
Formulários Padrões
 */

.text-label,
.form-label {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    padding: 5px;
    color: var(--cor-esmeralda-claro);
    display: inline-block;
    letter-spacing: 0.02em;
}

.text-label-muted {
    color: var(--cor-esmeralda-escuro);
    font-weight: 500;
}

.select2-hidden-accessible,
.form-select,
.form-control {
    border: 1px solid var(--cor-cinza-medio) !important;
    color: var(--text-dark);
    padding: 10px 12px !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.select2-hidden-accessible,
.form-control:hover,
.form-control:focus,
.form-select:hover,
.form-select:focus {
    border-color: var(--cor-esmeralda-escuro);
    box-shadow: 0 0 0 2px rgba(126, 148, 95, 0.2);
}

.form-group:focus-within > .form-label,
.form-group:focus-within > .text-label {
    color: var(--secondary-dark);
}

/* ======================================================= TABELAS ======================================================= */
/* ====== ESTILO GERAL DAS TABELAS ====== */
.table {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

/* Cabeçalho da Tabela */
.table thead th {
    background: var(--green-medium, #198754) !important;
    /* fallback verde caso var não exista */
    color: var(--white, #fff);
    border: 0;
    padding: 12px;
    text-align: center;
}

/* Corpo da Tabela */
.table tbody td {
    background: #fff;
    border-top: 1px solid #dee2e6;
    padding: 12px;
    vertical-align: middle;
    text-align: center;
}

/* Hover da Linha */
.table tbody tr:hover {
    background: #f5f5f5;
}

/* Ícones de Ação */
.table a i {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.table a:hover i {
    transform: scale(1.2);
}

/* Tooltip simples baseado no atributo title */
.table a[title] {
    position: relative;
}

.table a[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-dark, #343a40);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
}

/* ====== PAGINAÇÃO DO DATATABLES ====== */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    background-color: var(--green-medium, #198754);
    color: #fff !important;
    border: none;
    font-weight: 500;
    transition: background 0.2s ease-in-out;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: var(--accent-dark, #145c32);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: var(--accent-dark, #145c32);
    font-weight: bold;
}

/* Input de pesquisa e dropdown */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Remove fundo de paginação nativa */
nav[aria-label="pagination"] {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

/* ======================================================= BREADCRUMB MODERNO ======================================================= */
/* Breadcrumb moderno */
nav[aria-label="breadcrumb"] {
    background: none;
    padding: 0;
    margin-bottom: 1rem !important;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;

    margin: 0;

}

.breadcrumb-item {
    color: var(--cor-esmeralda-escuro);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›" !important;
    color: var(--cor-terracota) !important;
    padding: 0 0.5rem;
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--cor-esmeralda-escuro);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--cor-terracota) !important;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--cor-esmeralda-escuro) !important;
    font-weight: 700;
}

/* ============ PERFIL ================ */
.profile-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    /* centraliza horizontal */
}

.file-input {
    max-width: 250px;
    /* limita o tamanho do input */
}

/* ====================================================== Filtros Pesquisas ======================================== */
/* Botão Hamburguer */
.hamburger-btn {
    background: var(--cor-esmeralda-escuro);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hamburger-btn:hover {
    opacity: 0.8;
}

/* Menu Lateral */
.filter-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background-color: #fff;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 9999;
}

.filter-sidebar.open {
    right: 0;
}

.filter-sidebar h2 {
    margin-top: 0;
    font-size: 20px;
    color: var(--cor-esmeralda-escuro);
}

.multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.multi-option input {
    accent-color: var(--cor-esmeralda-escuro);
}

.apply-btn {
    margin-top: 20px;
    padding: 10px;
    width: 100%;
    background: var(--cor-esmeralda-escuro);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1000;
}

#overlay.show {
    display: block;
}

/* ======================================================= ÍCONES (Lucide) ======================================================= */
.lucide-icon {
    width: 20px;
    height: 20px;
}

.icone-img {
    width: 48px;
    height: 48px;
}

/* ======================================== LOGIN ================================================================ */
/* Mobile First */
.login {
    background: var(--cor-esmeralda-escuro) !important;
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    /* leve contraste */
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease;
}

.text-label-login {
    color: var(--cor-bege-medio);
    font-size: 0.95rem;
}

.form-control,
.btn,
.button-primary {
    font-size: 1rem;
    border-radius: 6px;
}

input.form-control {
    padding: 0.75rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    border-right: none;
}

.input-group button {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Animação */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login .form-control {
    padding: 12px 14px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    background: #fff !important;
    color: var(--text-dark) !important;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login .form-control::placeholder {
    color: #6c757d;
}

/* Foco nos campos */
.login .form-control:focus {
    border-color: #a4c4af;
    box-shadow: 0 0 0 0.2rem rgba(164, 196, 175, 0.3);
    outline: none;
}

/* Autofill fix */
.login input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    -webkit-text-fill-color: var(--text-dark) !important;
}

/* Input-group */
.input-group > .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn {
    min-width: 48px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-width: 0;
}

/* Links */
.login a {
    color: #cbd5c0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Spinner de carregamento no botão */
.button-primary.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.button-primary.loading::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Checkbox melhoria */
.form-check-input {
    margin-top: 0.35rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
}

.cep-load {
    color: #007bff;
    display: none;
    font-weight: bold;
}

/* Overlay que cobre a tela inteira durante requisições AJAX */
.ajax_load {
    display: none;
}

.ajax_load {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1050;
    /* acima do conteúdo, abaixo de modais */
    backdrop-filter: blur(2px);
}

/* Spinner dentro do overlay */
.ajax_load .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color, #0d6efd);
}

/* Caixa de mensagens (ajax_response) */
.ajax_response {
    margin: 1rem 0;
    display: none;
}

.ajax_response .alert {
    margin-bottom: 0.5rem;
    animation: fadeBounce 0.4s ease;
}

/* Animação simples para bounce/fade */
@keyframes fadeBounce {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/** Mensagens de Erros e Aviso */
.message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius-medium, 8px);
    font-weight: var(--weight-bold, 600);
    font-size: 0.95rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease-in-out;
    line-height: 1.4;
}

/* Ícones (caso use Lucide/FontAwesome) */
.message i {
    flex-shrink: 0;
    font-size: 1.2rem;
}

/* Sucesso */
.message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid rgba(6, 95, 70, 0.25);
}

/* Informação */
.message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.25);
}

/* Aviso */
.message.warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #ffeeba;
}

/* Erro */
.message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.25);
}

/* Animação suave */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/**
Footer
 */
footer {
    background: var(--cor-esmeralda-escuro);
    color: var(--text-light);
    text-align: center;
    padding: 15px;
    min-height: auto;
}

.footer-login {
    background: var(--cor-esmeralda-escuro);
    color: var(--text-light);
    text-align: center;
    padding: 15px !important;
    min-height: auto;
}

/* =========================================================
   RESPONSIVIDADE GERAL (BREAKPOINTS BOOTSTRAP)
========================================================= */

/* === 1. Oculta o menu mobile no desktop (>= 992px) === */
@media (min-width: 992px) {
    #menuToggle,
    .menu-toggle,
    .app-menu,
    .offcanvas.custom-offcanvas {
        display: none !important;
    }

    .app-nav {
        display: flex !important;
    }

    .logo-mobile {
        display: none !important;
    }
}

/* === 2. Oculta o mega menu central no mobile (<= 991px) === */
@media (max-width: 991.98px) {
    main {
        margin-top: 60px;
    }

    .app-header-inner {
        padding: 10px;
    }

    .logo-desktop {
        display: none !important;
    }

    .mega-menu-center {
        display: none !important;
    }

    .app-nav {
        display: none !important;
    }

    .menu-toggle {
        display: inline-flex !important;
    }

    .app-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        /* garantir que fique acima do conteúdo */
    }

    .rebanho-card-container {
        flex: 0 0 50%;
        /* 2 colunas em tablets */
        max-width: 50%;
    }
}

/* === 3. Ajustes finos para ícones e texto no mobile === */
@media (max-width: 576px) {
    .bg-header {
        padding: 0.5rem 1rem;
    }

    .rebanho-card-container {

        justify-content: center !important;
    }
    .app-header-inner {
        gap: 0.5rem;
    }

    .app-brand img {
        max-width: 180px;
        height: auto;
    }

    .icon-circle {
        width: 52px;
        height: 52px;
    }

    .icon-circle i {
        width: 20px;
        height: 20px;
    }

    .menu-icon-item small {
        font-size: 0.75rem;
    }

    .app-header-inner {
        gap: 0.5rem;
    }

    .page-title {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 10px;
    }

    .d-flex.flex-column.flex-sm-row.justify-content-between {
        align-items: center !important;
        text-align: center;
    }

    .d-flex.flex-column.flex-sm-row.justify-content-between .btn {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 10px;
    }

    .btn.button-primary {
        width: 100%;
        justify-content: center;
        border-radius: 999px;
        /* pill style */
    }

    nav[aria-label="breadcrumb"] {
        margin-top: 0.6rem;
    }

    .breadcrumb {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(6px);
        padding: 0.5rem 0.75rem !important;
    }

    .breadcrumb-item {
        max-width: 100px;
        /* evita quebrar layout */
    }

    .index-divisoes {
        flex-direction: row;
        justify-content: flex-start;
    }

    .rebanho-card-container {
        flex: 0 0 100%;
        /* 1 coluna no celular */
        max-width: 100%;
        justify-content: center;
    }

    .rebanho-card {
        text-align: center;
        padding: 16px;
    }

    .rebanho-title {
        font-size: 1.2rem;
    }

    .rebanho-info-item {
        font-size: 0.9rem;
    }

    .rebanho-card-body canvas {
        max-width: 220px;
        /* reduz gráfico no mobile */
        margin: 0 auto;
    }

    .hamburger-btn {
        width: 100%;
    }

}

/* === 4. Ajustes no login para mobile === */
@media (max-width: 420px) {
    .login-box {
        padding: 1.5rem 1rem;
    }

    .page-title {
        font-size: 1.4rem !important;
    }
}
