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

body {
  font-family: Arial, sans-serif;
  background-color: #0b0c2a;
  color: white;
}

/* CABEÇALHO */
header.header {
  background-color: #11153a;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 2px solid #00eaff;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-left h1 {
  color: #00eaff;
  font-size: 1.5rem;
  white-space: nowrap;
}

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

.logo-small {
  height: 50px;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.header-actions .btn {
  background-color: #00eaff;
  color: #0b0c2a;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

/* STATUS COM BOLINHA E PULSO */
.status-inline {
  font-size: 0.9rem;
  color: #00eaff;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: bold;
  color: #00eaff;
}

.status::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: gray;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.status.online::before {
  background-color: limegreen;
  animation: pulse 1.2s infinite;
}

.status.offline::before {
  background-color: red;
  animation: pulse 1.2s infinite;
}

/* PAINEL PRINCIPAL */
.main-panel {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

#searchInput {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid #00eaff;
  background-color: #0b0c2a;
  color: white;
  border-radius: 6px;
}

/* TABS */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  background-color: #11153a;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
}

.tab.active {
  background-color: #00eaff;
  color: #0b0c2a;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* SUBTABS */
.sub-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sub-tab {
  background-color: #11153a;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
}

.sub-tab.active {
  background-color: #00eaff;
  color: #0b0c2a;
}

/* CARTÕES DE INFORMAÇÃO */
.card {
  background-color: #1a1e40;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,255,255,0.1);
  margin-bottom: 1rem;
}

.card p + p {
  margin-top: 0.5rem;
}

.card p strong {
  display: inline-block;
  margin-top: 0.3rem;
  font-weight: bold;
}

/* CAMPOS DE EDIÇÃO */
.edit-title,
.edit-desc {
  width: 100%;
  background: #0b0c2a;
  color: white;
  border: 1px solid #00eaff;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  padding: 0.4rem;
}

.edit-desc {
  min-height: 60px;
  resize: vertical;
}

.add-btn {
  margin-top: 1rem;
  background-color: #00eaff;
  color: #0b0c2a;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* LOGIN */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #0b0c2a;
}

.login-box {
  background-color: #1a1e40;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.login-box img.logo {
  height: 60px;
  margin-bottom: 1rem;
}

.login-box h1 {
  color: #00eaff;
  margin-bottom: 1.5rem;
}

.login-box input {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid #00eaff;
  border-radius: 6px;
  background-color: #0b0c2a;
  color: white;
}

.login-box button {
  width: 100%;
  padding: 0.6rem;
  background-color: #00eaff;
  color: #0b0c2a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#errorMsg {
  color: red;
  margin-top: 0.5rem;
}

/* MODAL ADMIN - global */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: #1a1e40;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.modal-content h2 {
  color: #00eaff;
  margin-bottom: 1rem;
}

.modal-content input {
  width: 100%;
  padding: 0.6rem;
  margin-top: 1rem;
  border: 1px solid #00eaff;
  border-radius: 6px;
  background-color: #0b0c2a;
  color: white;
  font-size: 1rem;
}

.modal-buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.modal-buttons .btn {
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
}

.error-msg {
  color: red;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  header.header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left,
  .header-right {
    width: 100%;
    justify-content: space-between;
    flex-direction: row;
  }

  .header-right {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tabs,
  .sub-tabs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-panel {
    padding: 1rem;
  }

  #searchInput {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.2rem;
  }

  .status-inline {
    font-size: 0.85rem;
  }
}
