* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Alterado de center para flex-start */
  min-height: 100vh;
  padding: 0px;
  padding-top: 0px; /* Adicionado mais espaço no topo */
}

.mobile-container {
  width: 100%;
  max-width: 420px;
  background-color: #fff;
  border-radius: 12px;

  overflow: hidden;
  margin-top: 0; /* Garante que não haja margem extra no topo */
}

.header {
  background-color: #fff;
  color: #000;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
}

.header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #000;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-icon {
  font-size: 18px;
  color: #ff8c42;
  font-weight: normal;
  cursor: pointer;
  transition: transform 0.2s;
}

.search-icon:hover {
  transform: scale(1.1);
}

.plus-icon {
  font-size: 22px;
  font-weight: normal;
  color: #ff8c42;
  cursor: pointer;
  transition: transform 0.2s;
}

.plus-icon:hover {
  transform: scale(1.1);
}

.search-bar {
  display: none;
  padding: 12px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  animation: slideDown 0.3s ease-out;
}

.search-bar.active {
  display: block;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #ff8c42;
}

.search-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  cursor: pointer;
  font-size: 16px;
}

.search-close:hover {
  color: #ff8c42;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 60px;
  }
}

.tabs {
  display: flex;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.tab.active {
  color: #ff8c42;
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #ff8c42;
}

.filters {
  display: flex;
  padding: 12px 20px;
  gap: 10px;
  background-color: #fff;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #dee2e6;
  background-color: #fff;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active {
  background-color: #ff8c42;
  color: white;
  border-color: #ff8c42;
}

.occurrence-list {
  padding: 0 20px;
  background-color: #fff;
}

.occurrence-item {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid #e9ecef;
}

.occurrence-item:last-child {
  border-bottom: none;
}

.occurrence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
  padding: 4px;
  margin: -4px;
  border-radius: 8px;
}

.occurrence-header:hover {
  background-color: #f8f9fa;
}

.occurrence-content {
  flex: 1;
}

.occurrence-type {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.occurrence-time {
  font-size: 14px;
  color: #6c757d;
  display: flex;
  align-items: center;
}

.bat-tag {
  background-color: #e9ecef;
  color: #495057;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 2px;
}

.expand-icon {
  color: #6c757d;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s, color 0.2s;
}

.expand-icon:hover {
  color: #ff8c42;
}

.expand-icon.expanded {
  transform: rotate(180deg);
}

.occurrence-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.action-icons {
  display: flex;
  gap: 16px;
}

.action-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.2s;
}

.action-icon:hover {
  color: #ff8c42;
}

.delete-icon:hover {
  color: #dc3545;
}

.pdf-icon {
  color: #dc3545;
}

.pdf-icon:hover {
  color: #c82333;
}

.update-btn {
  background-color: white;
  color: #ff8c42;
  padding: 8px 16px;
  border: 2px solid #ff8c42;
  border-radius: 20px;
  cursor: pointer;
  display: inline-block;
  box-sizing: border-box;
  font-size: 0.8em;
  font-weight: 500;
  text-transform: none;
  min-width: 80px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  height: 36px;
}

.update-btn:hover {
  background-color: #ff8c42;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #343a40;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

/* Mensagens de estado */
.loading-message,
.empty-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
  font-size: 16px;
  color: #666;
}

.error-message {
  color: #d32f2f;
}

.empty-message {
  color: #999;
}

.loading-message::after {
  content: '...';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Estado vazio - Design melhorado */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
  min-height: 300px;
}

.empty-state-icon {
  font-size: 64px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.empty-state-icon i {
  display: block;
  animation: fadeIn 0.5s ease-in;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.empty-state-message {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  max-width: 300px;
}

.empty-state-message i {
  color: #ff8c42;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Estilo adicional para location */
.occurrence-location {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

body.sinistro-modal-open {
}

/* Modal personalizado */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    padding: 0;
    animation: modalSlideUp 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #ff6600 0%, #ff4500 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header .modal-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.modal-header .modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.modal-body {
    padding: 24px;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-line;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
  flex: 1;
  height: 50px;
  min-height: 50px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #ff6600 0%, #ff4500 100%);
  color: white;
}

.modal-btn-primary:hover {
    background: linear-gradient(135deg, #ff7700 0%, #ff5500 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.modal-btn-primary:active {
    transform: translateY(0);
}

.modal-btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.modal-btn-secondary:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        max-width: 90%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header .modal-title {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
        font-size: 15px;
    }
    
    .modal-footer {
        padding: 12px 20px;
    }
    
    .modal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

