/* ========================================
   Sistema de Acolhimento
   Estilos Globais
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.display {
    display: none !important;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
}

::-webkit-scrollbar-track {
    background-color: var(--Cor_Transparente);
}
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background: var(--Cor_Transparente);
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* ========================================
   Login Page
   ======================================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    text-align: -webkit-center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}


.logo_daniloim {
    width: 100px;
    position: relative;
    /*padding-bottom: 30px;*/
    right: 0px;
}
.logo_daniloim span {
    font-family: "Circular Book";
    font-size: 10px;
}
.logo_daniloim a {
    text-decoration: none; color: black;
}

/* ========================================
   Header
   ======================================== */

.main-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1500;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    row-gap: 20px;
    padding: 20px;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.logo-icon {
    font-size: 28px;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    align-items: stretch;
    margin: 0;
    padding: 0;
    flex-direction: row;
    flex-wrap: wrap;
}

.header-nav ul li {
    list-style: none;
}

.header-nav a,
.header-nav .dropdown > a {
    text-decoration: none;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s;
    display: block;
}

.header-nav a:hover,
.header-nav .dropdown > a:hover {
    background: #f8f9fa;
}

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    list-style: none;
    display: flex;
    gap: 5px;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    min-width: 200px;
    padding: 8px 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu li {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #333;
    border-radius: 0;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.dropdown .dropdown-menu {
    display: none;
}

/* ========================================
   Modal/Popup Styles
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: white;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* WhatsApp specific styles for better contrast */
.whatsapp-modal {
    background: white !important;
    color: #333 !important;
}

.whatsapp-modal .modal-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    color: #333;
}

.whatsapp-modal .modal-header h3 {
    color: #333 !important;
    font-weight: 600;
}

.whatsapp-modal .recipient-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
    border-radius: 4px;
    padding: 12px;
}

.whatsapp-modal .recipient-item:hover {
    background: #e9ecef;
}

.whatsapp-modal .recipient-name {
    color: #333 !important;
    font-weight: 600;
}

.whatsapp-modal .recipient-details {
    color: #666 !important;
    font-size: 14px;
}

.whatsapp-modal .modal-body {
    background: white;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Recipients list in modal */
.recipients-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.recipient-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipient-item:last-child {
    border-bottom: none;
}

.recipient-info {
    flex: 1;
}

.recipient-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.recipient-details {
    font-size: 14px;
    color: #666;
}

/* ========================================
   Pagination Styles
   ======================================== */

.pagination-container {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-page-info {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-jump input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ========================================
   Form enhancements
   ======================================== */

.zip-code-group {
    position: relative;
}

.zip-code-loader {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.zip-code-loader.show {
    display: block;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-size: 14px;
    color: #666;
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #333;
    margin-bottom: 5px;
}

.text-muted {
    color: #666;
    font-size: 14px;
}

.text-danger {
    color: var(--danger-color);
}

.text-info {
    color: var(--info-color);
}

.row {
    display: flex;
    gap: 20px;
    margin: 0 -10px;
    flex-direction: column;
}

.col-md-4 {
    flex: 0 0 33.333%;
    padding: 0 10px;
}

.col-md-6 {
    flex: 0 0 50%;
    padding: 0 10px;
}

.col-md-8 {
    flex: 0 0 66.666%;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
    
    .col-md-4,
    .col-md-6,
    .col-md-8 {
        flex: 0 0 100%;
    }
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.card-body {
    padding: 20px;
}

/* ========================================
   Dashboard
   ======================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.dashboard-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* ========================================
   Forms
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    /*max-width: 400px;*/
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control .opcao-multipla {
    min-width: 150px;height: 50px;display: flex;flex-direction: row;align-content: center;align-items: center;column-gap: 10px;cursor: pointer;
}


.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group.flex-grow {
    flex: 2;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

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

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

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

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ========================================
   Tables
   ======================================== */

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table tr,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    max-width: 80px;
    max-height: 80px;
    overflow: none;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f9fa;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert ul {
    margin: 10px 0 0 20px;
}

/* ========================================
   Badges
   ======================================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--success-color);
}

.badge-danger {
    background: var(--danger-color);
}

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

.badge-secondary {
    background: var(--secondary-color);
}

/* ========================================
   Modals
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* ========================================
   Visitor Lists
   ======================================== */

.recent-visitors-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visitor-item {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.visitor-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.visitor-info strong {
    color: #333;
}

.visitor-info .text-muted {
    font-size: 13px;
}

.visitor-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.visitor-meta small {
    font-size: 11px;
}

/* ========================================
   Permissions Grid
   ======================================== */

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.permission-section {
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bolder;
    justify-content: center;
    width: 100%;
    grid-column: 1 / -1;
}

.permission-section:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.permission-section-selecionado {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.permission-card {
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.permission-card:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.permission-card-selecionado {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.permission-card input[type="checkbox"] {
    margin-top: 3px;
}

.permission-info {
    flex: 1;
}

.permission-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.permission-info small {
    color: #666;
    font-size: 13px;
}

/* ========================================
   Groups Grid
   ======================================== */

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.group-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.group-header h4 {
    margin: 0;
    color: #333;
}

.group-actions {
    display: flex;
    gap: 5px;
}

.group-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.group-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.stat-item {
    font-size: 13px;
    color: #666;
}

.stat-item strong {
    color: #333;
}

.group-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.permission-badge {
    background: #e7f3ff;
    color: #0066cc;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ========================================
   Charts
   ======================================== */

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

.age-groups-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.age-group-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.group-label {
    font-weight: 500;
}

.group-count {
    color: #666;
}

/* ========================================
   Utility Classes
   ======================================== */

.small {
    font-size: 12px;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* ========================================
   Localização e Relatórios
   ======================================== */

.location-stats {
    max-height: 300px;
    overflow-y: auto;
}

.location-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.location-item:hover {
    background-color: #f8f9fa;
}

.location-name {
    font-weight: 500;
    color: #333;
}

.location-count {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}