/* assets/css/main.css */

/* --- Importação de Componentes --- */
@import url('components/header.css');
@import url('components/sidebar.css');
@import url('components/cards.css');
@import url('components/footer.css');
@import url('responsive.css');
@import url('pages/perfil.css');

/* --- Estilos Globais e Variáveis --- */
:root {
    --primary-color: #336600;
    --primary-color-dark: #2a5500;
    --light-grey: #f5f5f5;
    --medium-grey: #e6e6e6;
    --dark-grey: #4d4d4d;
    --text-color: #333;
    --header-height: 80px;
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 88px;
    --content-sidebar-width: 360px;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #fff;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-secondary { background:#f1f1f1; color:#333; border:1px solid #ddd; }
.btn-secondary:hover { background:#e6e6e6; }

/* Esconde os botões de menu em telas grandes por padrão */
.hamburger-menu,
.sidebar-toggle {
    display: none;
}

/* --- Layout Principal da Página --- */
.main-content-wrapper {
    padding-top: var(--header-height); /* Offset for fixed header */
    width: 100%;
    overflow-x: hidden; /* Previne a barra de rolagem horizontal */
}

.page-container {
    padding: 20px;
}

/* Formulários e cartões genéricos */
.form-page .card { background:#fff; border:1px solid var(--medium-grey); border-radius:8px; padding:20px; margin-bottom:20px; }
.form-group { display:flex; flex-direction:column; margin-bottom:14px; }
.form-group label { font-weight:600; margin-bottom:6px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea,
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="date"] {
    border:1px solid #ddd; border-radius:6px; padding:10px; font-size:14px;
}
.form-row { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:12px; }
.form-msg { margin-top:10px; color:#2a5500; }
.form-msg.error { color:#b00020; }
.my-4 { margin: 24px 0; }
.mt-2 { margin-top: 10px; }
.mb-2 { margin-bottom: 10px; }

/* Esconde o menu mobile por padrão em telas grandes */
.mobile-nav {
    display: none;
}

/* --- Layout Específico da Página do Mapa --- */
.map-page-content {
    display: flex;
    width: 100%;
    gap: 20px;
}

.content-sidebar {
    width: var(--content-sidebar-width);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-y: auto;
    height: calc(100vh - var(--header-height) - 40px);
}

.map-container-wrapper {
    flex-grow: 1;
    height: calc(100vh - var(--header-height) - 40px);
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* --- Content Sidebar Cards --- */
.content-sidebar-header {
    padding: 0 10px 10px 10px;
    border-bottom: 1px solid var(--medium-grey);
    margin-bottom: 15px;
}

.content-sidebar-header h2 {
    margin: 0;
    font-size: 22px;
}

.content-sidebar-header p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.pontos-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-ponto {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--medium-grey);
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-ponto:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.card-ponto-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: var(--medium-grey);
    border-radius: 6px;
    /* object-fit: cover; será usado se for tag <img> */
}

.card-ponto-img.card-ponto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    background-color: #f1f3f4;
}

.card-ponto-img.card-ponto-placeholder i { font-size: 22px; }

.card-ponto-body {
    flex-grow: 1;
}

.card-ponto-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
}

.card-ponto-desc {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.card-ponto .btn {
    padding: 6px 12px;
    font-size: 14px;
} 

/* Grid de mídias */
.media-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:20px; }
.badge { display:inline-block; padding:3px 8px; border-radius:12px; background:#eef6ea; color:#2a5500; font-size:12px; }
.cert-item { display:flex; align-items:center; gap:10px; margin-bottom:8px; }

/* Modais genéricos */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; visibility: hidden; transition: opacity .2s ease; z-index: 998; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 999; pointer-events: none; }
.modal.open { pointer-events: auto; }
.modal-dialog { width: 100%; max-width: 560px; background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transform: translateY(10px); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.modal.open .modal-dialog { transform: translateY(0); opacity: 1; }
.modal-header { padding: 14px 16px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; }
.modal-title { margin: 0; font-size: 18px; font-weight: 600; }
.modal-close { background: transparent; border: 0; font-size: 18px; cursor: pointer; }
.modal-body { padding: 16px; }
.modal-footer { padding: 12px 16px; border-top: 1px solid #eee; display: flex; gap: 10px; justify-content: flex-end; }

/* Toasts */
.toast-container { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 240px; max-width: 360px; background: #1f2937; color: #fff; border-radius: 6px; padding: 10px 12px; box-shadow: 0 8px 20px rgba(0,0,0,.25); opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #166534; }
.toast.error { background: #991b1b; }
.toast .toast-title { font-weight: 700; margin: 0 0 4px 0; font-size: 14px; }
.toast .toast-msg { margin: 0; font-size: 13px; }