/* ==================== VARIÁVEIS GLOBAIS ==================== */
:root {
    /* Backgrounds */
    --bg-main: #eef1f0;
    --bg-sidebar-right: #d3dad7;
    --bg-lost-section: #ccd3d0;
    /* Marca */
    --primary-green: #3a5e56;
    --primary-green-dark: #2e4c45;
    --primary-green-light: #4d7a70;
    --light-green: #9dbfa0;
    --primary-orange: #df7860;
    --primary-orange-dark: #c96a52;
    --primary-orange-light: #e8917c;
    /* Neutros */
    --white: #ffffff;
    --surface: #f7f9f8;
    --text-dark: #2a2f2e;
    --text-medium: #4a5552;
    --text-muted: #7a8c88;
    /* Bordas e sombras */
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 18px;
    --border-main: 1.5px solid var(--primary-green);
    --border-subtle: 1px solid rgba(58, 94, 86, 0.12);
    --shadow-xs: 0 1px 3px rgba(30, 50, 45, 0.06);
    --shadow-sm: 0 2px 8px rgba(30, 50, 45, 0.08);
    --shadow-md: 0 4px 16px rgba(30, 50, 45, 0.10);
    --shadow-lg: 0 8px 28px rgba(30, 50, 45, 0.13);
    --shadow-orange: 0 4px 16px rgba(223, 120, 96, 0.30);
    /* Transições */
    --transition-fast: 0.18s ease;
    --transition-base: 0.26s ease;
    --transition-slow: 0.4s ease;
}

/* ==================== RESET E TIPOGRAFIA ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: var(--light-green) transparent;
    -ms-overflow-style: none;
}

    *::-webkit-scrollbar {
        width: 5px;
        height: 5px;
    }

    *::-webkit-scrollbar-thumb {
        background: var(--light-green);
        border-radius: 10px;
    }

    *::-webkit-scrollbar-track {
        background: transparent;
    }

/* ==================== LAYOUT BASE (ASP.NET) ==================== */
body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.5;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

main[role="main"] {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

/* ==================== HEADER ==================== */
.top-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    border-bottom-left-radius: var(--border-radius-lg);
    border-bottom-right-radius: var(--border-radius-lg);
    margin-bottom: 20px;
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(30, 50, 45, 0.18);
}

.logo i {
    color: #e05555;
    filter: drop-shadow(0 1px 3px rgba(224, 85, 85, 0.4));
}

/* Navegação central */
.main-nav {
    display: flex;
    gap: 28px;
}

    .main-nav button {
        background: none;
        border: none;
        cursor: pointer;
    }

    .main-nav a {
        color: rgba(255, 255, 255, 0.88);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 12px;
        font-weight: 600;
        gap: 5px;
        letter-spacing: 0.03em;
        transition: color var(--transition-fast), transform var(--transition-fast);
    }

        .main-nav a:hover {
            color: var(--white);
            transform: translateY(-1px);
        }

    .main-nav i {
        font-size: 21px;
    }

/* Lado direito do header */
.header-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

/* Barra de pesquisa */
.search-bar {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
}

    .search-bar input {
        background: transparent;
        border: none;
        color: #fff;
        padding: 2px 8px;
        outline: none;
        width: 150px;
        transition: width 0.3s ease;
    }

        .search-bar input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

.btn-busca-seta {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 5px;
    transition: transform 0.2s ease, color 0.2s ease;
}

    .btn-busca-seta:hover {
        transform: translateX(2px);
        color: #ffca28; /* Cor de destaque ao passar o mouse, mude se preferir */
    }


/* Botão de login */
.btnLogin {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-block {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

    .login-block i {
        font-size: 22px;
    }

    .login-block span {
        font-size: 12px;
        font-weight: 700;
        text-transform: lowercase;
        letter-spacing: 0.04em;
    }

    .login-block:hover {
        color: var(--white);
        transform: translateY(-1px);
    }

/* Menu de usuário logado */
.btn-usuario {
    display: none;
}

.user-menu-logged {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--white);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .user-info span {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

/* ==================== LAYOUT DO DASHBOARD ==================== */
.dashboard-container {
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 14px;
    padding: 0 15px 15px;
    height: 80vh;
    background-color: var(--bg-main);
}


/* ==================== SIDEBAR ESQUERDA ==================== */
/* ── Sidebar Top Bar ── */
.sidebar-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    flex-shrink: 0;
}

.cases-count {
    font-size: 0.78rem;
    color: #888;
}

/* Botão favoritos */
.btn-favoritos-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1.5px solid #ccc;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    color: #555;
    transition: all 0.2s ease;
}

    .btn-favoritos-toggle .fa-heart {
        color: #ccc;
        transition: color 0.2s ease;
    }

    .btn-favoritos-toggle:hover {
        border-color: #e74c3c;
        color: #e74c3c;
    }

        .btn-favoritos-toggle:hover .fa-heart {
            color: #e74c3c;
        }

    /* Estado ativo — filtro de favoritos ligado */
    .btn-favoritos-toggle.ativo {
        background: #fdecea;
        border-color: #e74c3c;
        color: #e74c3c;
        font-weight: 600;
    }

        .btn-favoritos-toggle.ativo .fa-heart {
            color: #e74c3c;
        }

/* ==========================================================================
   BOTÃO DE FAVORITAR (CORAÇÃO)
   ========================================================================== */
.favoritar-btn {
    cursor: pointer;
    color: #6c757d;
    font-size: 1.2rem;
    position: relative;
    left: -1.5px;
    transition: transform 0.2s ease, color 0.2s ease;
}

    .favoritar-btn:hover {
        transform: scale(1.2);
    }

    .favoritar-btn.favoritado {
        color: #e63946 !important;
    }

.left-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    contain: layout style;
}

/* Lista de casos com scroll interno */
.cases-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-inline-end: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    contain: layout style;
}

/* Card de caso */
.case-card {
    display: flex;
    background-color: var(--white);
    border: var(--border-main);
    border-radius: var(--border-radius-lg);
    padding: 11px 14px;
    gap: 13px;
    align-items: center;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background-color var(--transition-base);
    cursor: pointer;
    isolation: isolate;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    margin: 4px 2px 2px;
}

    .case-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--light-green);
        background-color: var(--surface);
    }

    .case-card.active-card {
        border: 2px solid var(--primary-orange) !important;
        background-color: rgba(223, 120, 96, 0.04);
        transform: scale(1.015);
        box-shadow: 0 4px 18px rgba(223, 120, 96, 0.18), 0 1px 4px rgba(223, 120, 96, 0.10);
    }

    .case-card img {
        width: 62px;
        height: 62px;
        border-radius: 50%;
        object-fit: cover;
        border: 2.5px solid var(--light-green);
        box-shadow: var(--shadow-xs);
        flex-shrink: 0;
        transition: border-color var(--transition-base);
        will-change: border-color;
    }

    .case-card:hover img {
        border-color: var(--primary-green-light);
    }

/* Detalhes internos do card */
.case-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    min-width: 0;
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 3px;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    gap: 8px;
}

    .case-header > div {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        overflow: hidden;
        flex: 1 1 auto;
    }

        .case-header > div > span:first-child {
            white-space: nowrap;
            flex-shrink: 0; /* o "Id: DOG-120739" nunca trunca, conforme decidido */
        }

.case-details p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.case-details strong {
    color: var(--text-medium);
    font-weight: 600;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.badge-green {
    background-color: rgba(157, 191, 160, 0.22);
    border: 1px solid rgba(157, 191, 160, 0.4);
    padding: 3px 9px;
    border-radius: 12px;
    color: var(--primary-green);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    min-width: 0; /* permite que ela encolha e corte */
    flex-shrink: 1; /* é a primeira a cair quando falta espaço */
}

/* Botões inferiores da sidebar esquerda */
.sidebar-buttons {
    flex-shrink: 0;
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-orange {
    background-color: var(--primary-orange);
    color: var(--white);
    border: none;
    padding: 11px 10px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    flex: 1;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-orange);
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    will-change: transform;
    backface-visibility: hidden;
}

    .btn-orange:hover {
        background-color: var(--primary-orange-light);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(223, 120, 96, 0.38);
    }

    .btn-orange:active {
        background-color: var(--primary-orange-dark);
        transform: scale(0.98);
        box-shadow: var(--shadow-orange);
    }

/* ==================== ÁREA DO MAPA ==================== */
.main-map-area {
    height: 100%;
    width: 100%;
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: var(--border-main);
    box-shadow: var(--shadow-sm);
    contain: layout paint;
    isolation: isolate;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Popup do Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius-md);
    padding: 6px;
    box-shadow: var(--shadow-md);
}

.leaflet-popup-content b {
    color: var(--primary-green);
    font-size: 1.08em;
    letter-spacing: 0.01em;
}

.leaflet-popup-content button {
    margin-top: 9px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    will-change: background-color;
}

    .leaflet-popup-content button:hover {
        background: var(--primary-orange);
    }

/* Botão flutuante "Reportar Ocorrência" */
.btn-reportar-flutuante {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: var(--primary-orange);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 11px 26px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-orange);
    transition: background-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    will-change: transform;
    backface-visibility: hidden;
}

    .btn-reportar-flutuante:hover {
        background-color: var(--primary-orange-dark);
        transform: translateX(-50%) translateY(-3px);
        box-shadow: 0 8px 28px rgba(223, 120, 96, 0.42);
    }

    .btn-reportar-flutuante:active {
        background-color: var(--primary-orange-dark);
        transform: translateX(-50%) translateY(0px) scale(0.98);
        box-shadow: var(--shadow-orange);
    }

/* Botão flutuante "Recentralizar" (Minha Localização) */
.btn-recentrar-flutuante {
    position: absolute;
    bottom: 28px; /* Alinhado horizontalmente com o botão de reportar */
    right: 28px; /* Posicionado no canto inferior direito */
    z-index: 1000;
    background-color: var(--white);
    color: var(--primary-green); /* Usando o verde padrão como cor inativa */
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm); /* Sombra suave do seu sistema */
    transition: background-color var(--transition-base), transform var(--transition-base), color var(--transition-base), box-shadow var(--transition-base);
    will-change: transform;
    backface-visibility: hidden;
}

    .btn-recentrar-flutuante:hover {
        color: var(--primary-orange); /* Destaque na cor laranja do seu sistema */
        transform: translateY(-3px); /* Puxa a mesma animação de flutuação do botão reportar */
        box-shadow: var(--shadow-md);
    }

    .btn-recentrar-flutuante:active {
        transform: translateY(0px) scale(0.95);
        box-shadow: var(--shadow-sm);
    }

/* ==========================================
   SEÇÃO TUTORES (PETS PERDIDOS)
   ========================================== */
#section-tutores {
    grid-column: 2; /* Mantém o alinhamento caso use CSS grid global */
    height: 100%;
    width: 100%;
    overflow-y: auto; /* Permite rolar a lista de pets */
}

/* Grid Inteligente e Responsivo */
.tutores-grid {
    display: grid;
    /* Cria colunas automáticas de no mínimo 280px (largura do seu card) */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
    align-items: start;
}

/* Badge Vermelho Pulsante para Procura-se */
.badge-desaparecido {
    position: absolute;
    top: 13px;
    right: 13px;
    background-color: rgba(220, 53, 69, 0.90); /* Vermelho Bootstrap */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.05em;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.45);
}

/* Botão Topo: Registrar Pet */
.btn-registrar-perdido {
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-base);
}

    .btn-registrar-perdido:hover {
        background-color: var(--primary-green-dark);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        color: var(--white);
    }

/* Botão Base do Card: Gerar Cartaz (Glassmorphism) */
.btn-gerar-cartaz {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: 12px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    transition: all 0.2s ease-in-out;
}

    .btn-gerar-cartaz:hover {
        background-color: var(--primary-orange);
        border-color: var(--primary-orange);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(223, 120, 96, 0.4);
    }
/* Animação de bounce para marcadores */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }

    50% {
        transform: translateY(-10px);
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    }
}

.marker-bounce {
    animation: bounce 0.55s infinite;
    will-change: transform;
}
/* ==================== SIDEBAR DIREITA — PERFIL DO ANIMAL ==================== */
.right-sidebar,
.dog-profile-sidebar {
    background-color: var(--bg-sidebar-right);
    padding: 18px;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow-y: auto;
    height: 100%;
    scrollbar-gutter: stable;
    contain: layout style;
}

    /* Placeholder quando nenhum animal está selecionado */
    .right-sidebar:empty::before {
        content: "Selecione um animal no mapa para ver os detalhes";
        display: block;
        text-align: center;
        margin-top: 50%;
        color: var(--text-muted);
        font-style: italic;
        padding: 20px;
        line-height: 1.6;
    }

/* Foto de perfil */
.profile-img-wrap img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    border: 3px solid var(--white);
    margin-bottom: 13px;
    box-shadow: var(--shadow-sm);
    display: block;
    transition: box-shadow var(--transition-base);
}

    .profile-img-wrap img:hover {
        box-shadow: var(--shadow-md);
    }

/* Cabeçalho do perfil */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

    .profile-header h2 {
        font-size: 19px;
        color: var(--primary-green);
        font-weight: 800;
        letter-spacing: -0.01em;
        line-height: 1.2;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.edit-icon {
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    flex-shrink: 0;
    line-height: 1;
}

    .edit-icon:hover {
        color: var(--primary-green);
        background-color: rgba(58, 94, 86, 0.08);
    }

.profile-divider {
    border: none;
    border-top: 1px solid rgba(90, 120, 115, 0.2);
    margin: 2px 0;
    flex-shrink: 0;
}

/* Títulos de seção */
.section-title {
    font-size: 11.5px;
    color: var(--text-medium);
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Caixa de status */
.status-box {
    background-color: rgba(255, 255, 255, 0.5);
    border: var(--border-subtle);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(58, 94, 86, 0.07);
    padding-bottom: 5px;
    gap: 8px;
}

    .status-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.status-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    flex-shrink: 0;
}

.status-data {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.status-col p {
    font-size: 11px;
    color: var(--text-medium);
    margin-bottom: 4px;
    line-height: 1.45;
}

/* Botões de ação (circular) */
.action-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 12px;
}

.action-buttons-modern {
    display: flex;
    gap: 22px;
    justify-content: center;
}

.btn-modern {
    border: none;
    border-radius: 50%;
    width: 76px;
    height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    will-change: transform;
    backface-visibility: hidden;
    isolation: isolate;
}

    .btn-modern i {
        font-size: 22px;
        margin-bottom: 4px;
        pointer-events: none;
    }

    .btn-modern span {
        font-size: 11.5px;
        letter-spacing: 0.02em;
        pointer-events: none;
    }

    .btn-modern:hover {
        transform: scale(1.07);
    }

    .btn-modern:active {
        transform: scale(0.96);
    }

.btn-agua-modern {
    background: linear-gradient(145deg, #82c08c, #6aaa76);
    box-shadow: 0 4px 16px rgba(106, 170, 118, 0.38);
}

    .btn-agua-modern:hover {
        box-shadow: 0 6px 22px rgba(106, 170, 118, 0.50);
    }

.btn-comida-modern {
    background: linear-gradient(145deg, var(--primary-orange-light), var(--primary-orange));
    box-shadow: 0 4px 16px rgba(223, 120, 96, 0.35);
}

    .btn-comida-modern:hover {
        box-shadow: 0 6px 22px rgba(223, 120, 96, 0.48);
    }

/* Feedback visual de sucesso nos botões */
.btn-animacao-agua {
    background: linear-gradient(145deg, #5aade6, #3498db) !important;
    box-shadow: 0 0 16px rgba(52, 152, 219, 0.65) !important;
    transform: scale(1.07);
    transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.btn-animacao-comida {
    background: linear-gradient(145deg, #f0a060, #e67e22) !important;
    box-shadow: 0 0 16px rgba(230, 126, 34, 0.65) !important;
    transform: scale(1.07);
    transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

/* Card de registro de água/comida */
.user-status-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: 14px;
    box-shadow: var(--shadow-xs);
    border: var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 8px;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid rgba(58, 94, 86, 0.08);
    padding-bottom: 10px;
    margin-bottom: 4px;
}

.user-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.user-label {
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.4;
    gap: 6px;
}

    .user-label strong {
        color: var(--primary-green);
        font-size: 13.5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.user-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 4px;
}

.status-row {
    display: flex;
    flex-direction: column; /* empilha label em cima, valor embaixo */
    align-items: flex-start;
    gap: 2px;
    background-color: var(--bg-main);
    padding: 8px 10px;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
    min-width: 0;
    overflow: hidden;
}

    .status-row i {
        display: none; /* ou reposicione conforme o design — veja abaixo */
    }

    .status-row > span,
    .status-row > strong {
        display: block;
        min-width: 0;
        overflow: hidden;
    }

    .status-row:hover {
        background-color: #e5ebe9;
    }

    .status-row span {
        display: flex;
        flex-direction: column;
        font-size: 10.5px;
        color: var(--text-muted);
        line-height: 1.4;
        min-width: 0;
        overflow: hidden;
        flex: 1;
    }

        .status-row span strong {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 12.5px;
            color: var(--text-dark);
            font-weight: 600;
            font-variant-numeric: tabular-nums;
            display: block; /* garante que o ellipsis funcione */
        }

.status-value {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    min-width: 0;
    width: 100%;
}

.status-label-text {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1.4;
}

.icon-agua {
    color: #3498db;
    font-size: 17px;
    flex-shrink: 0;
}

.icon-comida {
    color: #e67e22;
    font-size: 17px;
    flex-shrink: 0;
}

.animal-name {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 13px;
}

.avatar-md {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #dde4e2;
    flex-shrink: 0;
    object-fit: cover;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Mantém datas de água/comida alinhadas e sem quebra de linha */
#sidebar-last-agua,
#sidebar-last-comida {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ==================== SEÇÃO DE COMENTÁRIOS ==================== */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.comment-input-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* Input de comentário */
.comment-input {
    flex-grow: 1;
    border: 1.5px solid transparent;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.65);
    color: var(--text-dark);
    line-height: 1.4;
    transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    min-width: 0;
}

    .comment-input::placeholder {
        color: var(--text-muted);
    }

    .comment-input:focus {
        background-color: var(--white);
        border-color: var(--light-green);
        box-shadow: 0 0 0 3px rgba(157, 191, 160, 0.22);
    }

/* Botão de envio */
.btn-send-comment {
    background-color: var(--light-green);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(157, 191, 160, 0.35);
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    will-change: transform;
    backface-visibility: hidden;
}

    .btn-send-comment i {
        font-size: 13px;
        margin-left: -1px;
        pointer-events: none;
    }

    .btn-send-comment:hover {
        background-color: var(--primary-green);
        transform: scale(1.08);
        box-shadow: 0 4px 12px rgba(58, 94, 86, 0.3);
    }

    .btn-send-comment:active {
        transform: scale(0.94);
        box-shadow: 0 1px 4px rgba(58, 94, 86, 0.2);
    }

/* Lista de comentários com scroll interno */
.comments-list {
    max-height: 240px;
    overflow-y: auto;
    padding-inline-end: 4px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    contain: layout style;
}

/* Item individual de comentário */
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: rgba(255, 255, 255, 0.38);
    padding: 9px 10px;
    border-radius: var(--border-radius-md);
    transition: background-color var(--transition-fast);
}

    .comment-item:hover {
        background: rgba(255, 255, 255, 0.72);
    }

.comment-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

    .comment-content p {
        font-size: 12px;
        margin: 0;
        color: var(--text-dark);
        line-height: 1.5;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .comment-content strong {
        color: var(--primary-green);
        font-weight: 700;
        margin-right: 3px;
    }

    .comment-content .text-muted {
        font-size: 10px;
        margin-top: 3px;
        opacity: 0.75;
        line-height: 1.3;
    }

/* Spinner de carregamento */
.fa-spinner {
    color: var(--primary-green);
    font-size: 17px;
}


/* =========================================
   MODAL DE REPORTAR OCORRÊNCIA
   ========================================= */

/* Estrutura do Modal */
.modal-reportar {
    border-radius: var(--border-radius-lg, 18px); /* Fallback caso a variável não exista neste escopo */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background-color: var(--white, #fff);
}

    .modal-reportar .titulo-modal {
        color: var(--text-dark, #2a2f2e);
    }

    .modal-reportar .label-custom {
        color: var(--text-dark, #2a2f2e);
    }

    /* Inputs, Selects e Textareas */
    .modal-reportar .form-custom {
        background-color: var(--surface, #f7f9f8);
        border: var(--border-subtle, 1px solid rgba(58, 94, 86, 0.12));
        border-radius: var(--border-radius-sm, 6px);
        color: var(--text-medium, #4a5552);
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .modal-reportar .form-custom:focus {
            background-color: var(--white, #fff);
            border-color: var(--primary-green, #3a5e56);
            box-shadow: 0 0 0 3px rgba(58, 94, 86, 0.15); /* Efeito de foco acessível */
            outline: none;
        }

        .modal-reportar .form-custom::placeholder {
            color: var(--text-muted, #7a8c88);
        }

    /* Checkboxes customizados */
    .modal-reportar .check-custom .form-check-input {
        border-color: var(--text-muted, #7a8c88);
        cursor: pointer;
    }

        .modal-reportar .check-custom .form-check-input:checked {
            background-color: var(--primary-green, #3a5e56);
            border-color: var(--primary-green, #3a5e56);
        }

    .modal-reportar .check-custom .form-check-label {
        color: var(--text-medium, #4a5552);
        cursor: pointer;
    }

    /* Botões Radio Customizados (Animal na Rua / Meu Pet Sumiu) */
    .modal-reportar .btn-radio-custom {
        border: 1px solid var(--border-subtle, rgba(58, 94, 86, 0.12));
        color: var(--text-medium, #4a5552);
        background-color: var(--surface, #f7f9f8);
        transition: all 0.2s ease-in-out;
        border-radius: var(--border-radius-sm, 6px);
    }

        .modal-reportar .btn-radio-custom:hover {
            background-color: #eef1f0; /* bg-main */
        }

/* Estado Ativo: Animal na Rua (Verde) */
.btn-check:checked + .btn-radio-custom:not(.btn-radio-orange) {
    background-color: var(--primary-green, #3a5e56);
    color: var(--white, #ffffff);
    border-color: var(--primary-green, #3a5e56);
}

/* Estado Ativo: Meu Pet Sumiu (Laranja) - Para dar urgência */
.btn-check:checked + .btn-radio-orange {
    background-color: var(--primary-orange, #df7860);
    color: var(--white, #ffffff);
    border-color: var(--primary-orange, #df7860);
}

/* Botão de Submit (Registrar Marcação) */
.modal-reportar .btn-submit-custom {
    background-color: var(--primary-green, #3a5e56);
    color: var(--white, #ffffff);
    border-radius: var(--border-radius-md, 12px);
    padding: 14px 0;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
}

    .modal-reportar .btn-submit-custom:hover {
        background-color: var(--primary-green-dark, #2e4c45);
        color: var(--white, #ffffff);
    }

    .modal-reportar .btn-submit-custom:active {
        transform: scale(0.98); /* Microinteração de clique */
    }

/* =========================================
   CHIPS DE CUIDADOS (Água / Comida)
   ========================================= */

.modal-reportar .btn-chip-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface, #f7f9f8);
    border: 1px solid var(--border-subtle, rgba(58, 94, 86, 0.12));
    color: var(--text-medium, #4a5552);
    border-radius: 50px; /* Formato de pílula arredondada */
    padding: 8px 18px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

    /* Efeito de Hover suave */
    .modal-reportar .btn-chip-custom:hover {
        background-color: #eef1f0; /* var(--bg-main) */
        transform: translateY(-1px);
    }

    /* Cores Iniciais dos Ícones */
    .modal-reportar .btn-chip-custom i {
        font-size: 1.1rem;
        transition: color 0.2s ease;
    }

.modal-reportar .icon-agua {
    color: #5bc0de;
}
/* Azul claro/água */
.modal-reportar .icon-comida {
    color: #f0ad4e;
}
/* Laranja/amarelo */

/* * Estado Selecionado (Checked)
 * Quando o checkbox invisível estiver marcado, o label ao lado dele muda de estilo
 */
.btn-check:checked + .btn-chip-custom {
    background-color: var(--primary-green, #3a5e56);
    color: var(--white, #ffffff);
    border-color: var(--primary-green, #3a5e56);
    box-shadow: 0 4px 12px rgba(58, 94, 86, 0.25);
}

    /* Deixa os ícones brancos quando selecionado para dar contraste */
    .btn-check:checked + .btn-chip-custom i {
        color: var(--white, #ffffff);
    }

/* =========================================
   UPLOAD DE FOTO CUSTOMIZADO
   ========================================= */

.modal-reportar .upload-box-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 16px;
    background-color: var(--surface, #f7f9f8);
    border: 2px dashed var(--text-muted, #7a8c88);
    border-radius: var(--border-radius-md, 12px);
    cursor: pointer;
    transition: all 0.3s ease;
}

    /* Efeito ao passar o mouse */
    .modal-reportar .upload-box-custom:hover {
        background-color: #eef1f0; /* var(--bg-main) */
        border-color: var(--primary-green, #3a5e56);
    }

        .modal-reportar .upload-box-custom:hover .upload-icon {
            color: var(--primary-green, #3a5e56);
            transform: scale(1.1);
        }

/* Ícone da Câmera */
.modal-reportar .upload-icon {
    font-size: 2.2rem;
    color: var(--text-muted, #7a8c88);
    transition: all 0.3s ease;
}

/* Estado de Sucesso (Quando há arquivo) */
.modal-reportar .upload-box-custom.has-file {
    border-color: var(--primary-green, #3a5e56);
    background-color: rgba(58, 94, 86, 0.05); /* Fundo verde super clarinho */
}

/* =========================================
   COMPLEMENTOS - MODAL DE EDIÇÃO
   ========================================= */

/* Botão Salvar (Laranja) */
.modal-reportar .btn-submit-orange {
    background-color: var(--primary-orange, #df7860);
    color: var(--white, #ffffff);
    border-radius: var(--border-radius-md, 12px);
    padding: 14px 0;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
}

    .modal-reportar .btn-submit-orange:hover {
        background-color: var(--primary-orange-dark, #c96a52);
        color: var(--white, #ffffff);
    }

    .modal-reportar .btn-submit-orange:active {
        transform: scale(0.98);
    }

/* Card demonstrativo da foto atual */
.modal-reportar .foto-atual-card {
    background-color: var(--surface, #f7f9f8);
    border-radius: var(--border-radius-sm, 6px);
    border: 1px solid var(--border-subtle, rgba(58, 94, 86, 0.12));
}

.modal-reportar .foto-atual-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.1);
}
/* ==================== MODAIS ==================== */


.nav-btn-transparent {
    background-color: transparent;
    border: none;
}

.custom-modal-radius {
    border-radius: var(--border-radius-lg);
}

.modal-icon-color {
    color: var(--primary-green);
}

.modal-title-custom {
    color: var(--primary-green);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.btn-login-submit {
    background-color: var(--primary-orange);
    border: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-orange);
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

    .btn-login-submit:hover {
        background-color: var(--primary-orange-dark);
        color: var(--white);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(223, 120, 96, 0.4);
    }

    .btn-login-submit:active {
        transform: scale(0.98);
    }

.modal-link-cadastro {
    color: var(--primary-orange);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition-fast);
}

    .modal-link-cadastro:hover {
        color: var(--primary-green);
        text-decoration: underline;
    }

/* ==================== FOOTER ==================== */
footer.footer {
    background: linear-gradient(90deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    color: rgba(255, 255, 255, 0.88);
    padding: 3px 0;
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
    text-align: center;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-top: none !important;
    box-shadow: 0 -3px 12px rgba(30, 50, 45, 0.14);
    z-index: 10;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    width: 100%;
}

    footer.footer.text-muted {
        color: rgba(255, 255, 255, 0.88) !important;
    }

    footer.footer a {
        color: var(--primary-orange-light);
        text-decoration: none;
        font-weight: 700;
        margin-left: 5px;
        transition: color var(--transition-fast);
    }

        footer.footer a:hover {
            color: var(--light-green);
            text-decoration: underline;
        }

/* ==========================================
   CARROUSSEL
   ========================================== */
/* ==================== SEÇÃO DO FEED / CAROUSEL ==================== */

#section-feed:not(.d-none) {
    grid-column: 2;
    height: 100%;
    width: 100%;
    overflow: hidden;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-wrapper {
    width: 100%;
    margin: 0 !important;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#dogCarousel {
    width: 100%;
    background-color: var(--bg-sidebar-right) !important;
    border-radius: var(--border-radius-lg) !important;
    border: var(--border-main);
    box-shadow: var(--shadow-md) !important;
    padding: 24px 48px !important;
    position: relative;
    overflow: hidden;
}

    /* ---- Track com peek lateral ---- */
    #dogCarousel .carousel-inner {
        overflow: visible !important;
        display: flex;
        align-items: center;
        padding: 16px 0 !important;
    }

    #dogCarousel .carousel-item {
        display: block !important;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.82) translateY(12px);
        opacity: 0.52;
        filter: brightness(0.78);
        transition: transform 0.38s cubic-bezier(.4,0,.2,1), opacity 0.38s ease, filter 0.38s ease, box-shadow 0.38s ease;
        width: 280px;
        pointer-events: none;
        will-change: transform, opacity, filter;
        z-index: 1;
    }

        #dogCarousel .carousel-item.active {
            position: relative;
            top: auto;
            left: auto;
            transform: scale(1) translateY(0);
            opacity: 1;
            filter: none;
            pointer-events: auto;
            z-index: 3;
            margin-inline: auto;
        }

        /* Vizinhos visíveis (prev e next) */
        #dogCarousel .carousel-item.carousel-item-next,
        #dogCarousel .carousel-item.carousel-item-prev {
            opacity: 0.52;
            filter: brightness(0.78);
            transform: translate(-50%, -50%) scale(0.82) translateY(12px);
            z-index: 2;
        }

/* Card full-bleed */
.animal-card {
    width: 280px;
    border-radius: 22px !important;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 12px 40px rgba(46, 76, 69, 0.28);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: pointer;
    position: relative;
    isolation: isolate;
    will-change: transform;
}

    .animal-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 48px rgba(46, 76, 69, 0.34);
    }

/* Foto ocupa tudo — sem área branca abaixo */
.animal-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    background-color: var(--bg-main);
    border-radius: 22px;
}

.animal-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
    will-change: transform;
}

.animal-card:hover .animal-card-img {
    transform: scale(1.04);
}

/* Badge flutuante de distância */
.distance-badge {
    position: absolute;
    top: 13px;
    right: 13px;
    background-color: rgba(46, 76, 69, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.04em;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-xs);
}

    .distance-badge i {
        color: var(--primary-orange);
    }

/* Overlay glassmorphism na base da foto */
.animal-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 48px 18px 18px;
    background: linear-gradient(to top, rgba(36, 60, 54, 0.90) 0%, rgba(36, 60, 54, 0.50) 55%, transparent 100%);
    z-index: 3;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
}

/* Painel glass com info e tags dentro do overlay */
.animal-card-glass {
    background: rgba(36, 60, 54, 0.48);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    margin-top: 8px;
}

.animal-card-id {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.52);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.animal-card-overlay h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 3px;
}

.animal-card-addr {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

    .animal-card-addr i {
        flex-shrink: 0;
        font-size: 10px;
        color: var(--primary-orange);
    }

/* Tags de Características */
.animal-tag {
    background-color: rgba(157, 191, 160, 0.22);
    border: 1px solid rgba(157, 191, 160, 0.38);
    color: #cde8d0;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: background-color var(--transition-fast);
}

    .animal-tag:hover {
        background-color: rgba(157, 191, 160, 0.40);
    }

/* Remove a área branca inferior que existia antes */
.animal-card .p-4,
.animal-card .bg-white {
    display: none !important;
}

/* Botões de seta */
#dogCarousel .carousel-control-prev,
#dogCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity var(--transition-base), left var(--transition-base), right var(--transition-base);
    z-index: 10;
}

#dogCarousel:hover .carousel-control-prev {
    opacity: 1;
    left: 6px;
}

#dogCarousel:hover .carousel-control-next {
    opacity: 1;
    right: 6px;
}

#dogCarousel .carousel-control-prev-icon,
#dogCarousel .carousel-control-next-icon {
    background-color: var(--primary-green) !important;
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    background-size: 40%;
}

    #dogCarousel .carousel-control-prev-icon:hover,
    #dogCarousel .carousel-control-next-icon:hover {
        background-color: var(--primary-orange) !important;
        transform: scale(1.08);
    }

/* ==========================================================================
   1. DESKTOP GRANDE (≥ 1400px) — apenas ajustes finos
   ========================================================================== */
@media (min-width: 1400px) {
    .dashboard-container {
        grid-template-columns: 320px 1fr 340px;
    }

    .top-header {
        padding: 16px 48px;
    }

    .search-bar {
        width: 300px;
    }

    /* ---- Ajustes para salvar o layout do Card ---- */
    .case-card {
        padding: 10px 12px; /* Reduzimos o padding interno para sobrar espaço */
        gap: 10px; /* Reduz a distância entre a foto e os textos */
        font-size: 12.5px;
    }

    .case-details {
        /* CRÍTICO: min-width: 0 permite que elementos filhos cortem o texto (ellipsis) */
        min-width: 0;
    }

    .case-header {
        font-size: 12.5px; /* Diminuímos a fonte do título */
        flex-wrap: nowrap; /* Trava tudo na mesma linha */
        gap: 8px; /* Espaço mais contido entre o nome/badge e o coração */
    }

        /* Força textos longos (como nomes ou raças grandes) a ganharem '...' */
        .case-header > span,
        .case-header > div,
        .text-truncate {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }


    .badge-green {
        font-size: 10px; /* Reduz a fonte da tag verde */
        padding: 2px 7px; /* Tag mais enxuta */
    }

    /* Garante a estabilidade e o lugar do coração */
    .favoritar-btn {
        cursor: pointer;
        color: #6c757d;
        font-size: 1.1rem;
        position: relative;
        transition: transform 0.2s ease, color 0.2s ease;
        flex-shrink: 0;
        margin-left: auto;
    }
}

/* ==========================================================================
   2. LAPTOP PEQUENO / TABLET LANDSCAPE (992px – 1199px)
   ========================================================================== */
@media (max-width: 1199px) {
    /* Header */
    .top-header {
        padding: 12px 20px;
    }

    .search-bar {
        width: 200px;
    }

    /* Dashboard: sidebar direita um pouco menor */
    .dashboard-container {
        grid-template-columns: 260px 1fr 280px;
        gap: 10px;
    }
}


/* ==========================================================================
   3. TABLET LANDSCAPE / LAPTOP MÍNIMO (768px – 991px)
      Grid vai para 2 colunas; sidebar direita vira drawer lateral
   ========================================================================== */
@media (max-width: 991px) {

    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    main[role="main"] {
        overflow-y: visible;
    }

    .top-header {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 12px;
        border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    }

    .main-nav {
        gap: 18px;
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .header-right {
        gap: 12px;
    }

    .search-bar {
        width: 180px;
    }

    .dashboard-container {
        grid-template-columns: 240px 1fr;
        grid-template-rows: auto;
        height: auto;
        min-height: 70vh;
        padding: 0 10px 10px;
        gap: 10px;
        position: relative;
    }

    /* ── Drawer lateral direito ── */
    .right-sidebar,
    .dog-profile-sidebar {
        /* Sai do grid e vira painel fixo deslizando da direita */
        position: fixed;
        top: 0;
        right: -100%;
        bottom: 0; /* FIX: altura real da viewport */
        width: min(340px, 90vw);
        height: 100dvh; /* fallback para dvh */
        z-index: 1100;
        border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
        box-shadow: -6px 0 28px rgba(30, 50, 45, 0.22);
        transition: right 0.3s cubic-bezier(.4, 0, .2, 1);
        /* FIX crítico: remove contain que bloqueia scroll interno */
        contain: none;
        overflow-y: scroll; /* scroll (não auto) garante scrollbar sempre presente */
        -webkit-overflow-scrolling: touch; /* iOS momentum scroll */

        padding: 18px;
        display: flex;
        flex-direction: column;
        gap: 11px;
    }

        .right-sidebar.drawer-open,
        .dog-profile-sidebar.drawer-open {
            right: 0;
        }

    /* Botão fechar drawer (HTML necessário — ver nota no final) */
    .btn-close-drawer {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky; /* sticky dentro do flex column para ficar no topo ao scrollar */
        top: 0;
        align-self: flex-start;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        background: rgba(58, 94, 86, 0.1);
        border: none;
        border-radius: 50%;
        color: var(--primary-green);
        font-size: 14px;
        cursor: pointer;
        z-index: 10;
        transition: background var(--transition-fast), color var(--transition-fast);
        margin-bottom: 4px;
    }

        .btn-close-drawer:hover {
            background: rgba(223, 120, 96, 0.15);
            color: var(--primary-orange);
        }

    /* Overlay escuro */
    .drawer-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1099;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

        .drawer-overlay.active {
            display: block;
        }

    /* Feed/Carrossel ocupa as 2 colunas */
    #section-feed:not(.d-none) {
        grid-column: span 2;
        height: 70vh;
        padding: 0 !important;
    }

    .filtro-mapa-wrapper {
        max-width: 220px;
    }

    .btn-reportar-flutuante {
        font-size: 13px;
        padding: 9px 18px;
        gap: 8px;
    }

    .dogSwiper {
        padding: 20px 0 !important;
    }

    .swiper-btn {
        opacity: 1 !important;
    }
}

/* ==========================================================================
   4. TABLET PORTRAIT (576px – 767px)
      Layout vira stack vertical; sidebar direita vira bottom sheet
   ========================================================================== */
@media (max-width: 767px) {

    .top-header {
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    .search-bar {
        width: 140px;
        padding: 4px 10px;
    }

    .main-nav {
        gap: 12px;
    }

        .main-nav a {
            font-size: 11px;
            gap: 3px;
        }

        .main-nav i {
            font-size: 18px;
        }

    .dashboard-container {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 0 8px 80px;
        gap: 8px;
    }

    .left-sidebar {
        height: auto;
        max-height: 38vh;
        min-height: 160px;
    }

    .cases-list {
        max-height: 26vh;
        min-height: 100px;
    }

    .main-map-area {
        height: 50vw;
        min-height: 260px;
        max-height: 360px;
    }

    #map {
        height: 100%;
    }

    /* ── Bottom sheet ── */
    .right-sidebar,
    .dog-profile-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: -100%;
        top: auto;
        width: 100%;
        height: 88dvh;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
        box-shadow: 0 -6px 28px rgba(30, 50, 45, 0.22);
        transition: bottom 0.32s cubic-bezier(.4, 0, .2, 1);
        /* FIX crítico: scroll funcional */
        contain: none;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        padding: 48px 16px 24px; /* topo generoso para o handle */
        display: flex;
        flex-direction: column;
        gap: 11px;
        z-index: 1100;
    }

        .right-sidebar.drawer-open,
        .dog-profile-sidebar.drawer-open {
            bottom: 0;
        }

    /* Handle visual do bottom sheet (pill cinza) */
    .btn-close-drawer {
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 5px;
        border-radius: 3px;
        background: rgba(58, 94, 86, 0.3);
        border: none;
        cursor: pointer;
        /* esconde o ícone — funciona como "pull handle" */
        color: transparent;
        font-size: 0;
    }

    .sidebar-buttons {
        flex-direction: row;
        gap: 8px;
    }

    .btn-orange {
        font-size: 12px;
        padding: 9px 8px;
    }

    .btn-reportar-flutuante {
        font-size: 12px;
        padding: 8px 14px;
        gap: 6px;
        bottom: 16px;
    }

    .tutores-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    #section-feed:not(.d-none) {
        height: 60vh;
    }

    .animal-card-img-wrapper {
        height: 280px;
    }
}

/* ==========================================================================
   5. MOBILE (< 576px)
   ========================================================================== */
@media (max-width: 575px) {

    .top-header {
        padding: 8px 10px;
        gap: 6px;
    }

    .search-bar {
        display: none;
    }

    .main-nav {
        gap: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding-top: 8px;
        margin-top: 4px;
    }

    .header-right {
        gap: 8px;
    }

    .user-info span {
        font-size: 11px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-menu-logged .btn-outline-light {
        font-size: 11px;
        padding: 3px 8px;
    }

    .dashboard-container {
        padding: 0 6px 72px;
        gap: 6px;
    }

    .left-sidebar {
        max-height: 42vh;
    }

    .cases-list {
        max-height: 30vh;
    }

    .case-card {
        padding: 8px 10px;
        gap: 9px;
        border-radius: var(--border-radius-md);
    }

        .case-card img {
            width: 48px;
            height: 48px;
        }

    .case-header {
        font-size: 12px;
    }

    .case-details p {
        font-size: 10.5px;
    }

    .badge-green {
        font-size: 9.5px;
        padding: 2px 6px;
    }

    .main-map-area {
        height: 46vw;
        min-height: 200px;
        max-height: 280px;
    }

    .btn-reportar-flutuante {
        font-size: 11.5px;
        padding: 7px 12px;
        gap: 5px;
        bottom: 10px;
        border-radius: 24px;
        max-width: calc(100% - 80px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-recentrar-flutuante {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 10px;
        right: 14px;
    }

    .filtro-mapa-wrapper {
        max-width: 186px;
    }

    .filtro-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        padding: 6px 8px 8px;
    }

    .filtro-mapa-painel--aberto {
        max-height: 360px;
    }

    /* ── Bottom sheet mobile ── */
    .right-sidebar,
    .dog-profile-sidebar {
        height: 92dvh; /* FIX: mais altura para caber todo o conteúdo */
        padding: 48px 14px 32px; /* FIX: padding-bottom generoso para comentários */
    }

    /* FIX: imagem menor — libera espaço para o resto */
    .profile-img-wrap img {
        height: 120px;
        margin-bottom: 8px;
    }

    .profile-header h2 {
        font-size: 15px;
    }

    .profile-header {
        gap: 4px;
    }

    .btn-modern {
        width: 62px;
        height: 62px;
    }

        .btn-modern i {
            font-size: 18px;
        }

        .btn-modern span {
            font-size: 10px;
        }

    .status-label {
        font-size: 10px;
        white-space: nowrap;
    }

    .status-data {
        font-size: 11.5px;
    }

    /* FIX: água/comida em coluna única — mais espaço para os dados */
    .user-card-body {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* FIX: lista de comentários com altura menor para não travar o scroll */
    .comments-list {
        max-height: 180px;
    }

    .btn-orange {
        font-size: 11px;
        padding: 8px 6px;
    }

    #section-feed:not(.d-none) {
        height: 52vh;
    }

    .animal-card {
        width: 210px;
    }

    .animal-card-img-wrapper {
        height: 230px;
    }

    .animal-card-overlay h3 {
        font-size: 0.92rem;
    }

    .tutores-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 4px;
    }

    .animal-card.mx-auto {
        width: 100%;
        max-width: 320px;
    }

    .modal-reportar .btn-chip-custom {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .modal-reportar .upload-box-custom {
        padding: 16px 10px;
    }
}

/* ==========================================================================
   6. MOBILE PEQUENO (< 400px)
   ========================================================================== */
@media (max-width: 399px) {

    .top-header {
        padding: 6px 8px;
    }

    .main-nav {
        gap: 8px;
    }

        .main-nav a {
            font-size: 9.5px;
        }

        .main-nav i {
            font-size: 15px;
        }

    .logo i {
        font-size: 1.8rem !important;
    }

    .case-card {
        padding: 7px 8px;
        gap: 7px;
    }

        .case-card img {
            width: 42px;
            height: 42px;
        }

    .dashboard-container {
        padding: 0 4px 64px;
    }

    .main-map-area {
        min-height: 180px;
    }

    /* Botão flutuante vira só ícone */
    .btn-reportar-flutuante .btn-text {
        display: none;
    }

    .btn-reportar-flutuante {
        padding: 10px 14px;
        gap: 0;
    }

    .animal-card {
        width: 185px;
    }

    .animal-card-img-wrapper {
        height: 205px;
    }

    .btn-modern {
        width: 54px;
        height: 54px;
    }

    .profile-img-wrap img {
        height: 100px;
    }

    .filtro-grid {
        grid-template-columns: 1fr;
    }

    .filtro-mapa-wrapper {
        max-width: 160px;
    }

    .left-sidebar {
        max-height: 36vh;
    }

    .cases-list {
        max-height: 24vh;
    }
}