* {
  background: none;
  color: white;
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  list-style: none;
  border: none;
  outline: none;
  box-sizing: border-box;
}

html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  zoom: 0.85;
  background: none;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  touch-action: none;
  min-height: 100%;
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #001845;
  color: white;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 20px;
  overflow: hidden;
  justify-content: center;
}

body.no-scroll {
  overflow: hidden !important;
  touch-action: none;
  position: fixed;
  width: 100%;
}


.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  gap: 20px;
  margin: 0;
  padding: 47px;
}

.deviceForm {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 95%;
  justify-content: flex-start;
  align-items: center;
  padding: 47px;
  position: absolute;
  bottom: 0;
  background: #002855;
  z-index: 1;
  border-radius: 30px 30px 0px 0px;
  box-shadow: 0px -23px 50px 11px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out;
  pointer-events: none;
}

.deviceForm.visible {
  transform: translateY(0);
  pointer-events: auto;
}

.deviceForm > *:not(:last-child) {
  margin-bottom: 20px;
}

.horizontal-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.container-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  gap: 20px;
  margin: 0;
  padding: 47px;
  z-index: 1;
  position: absolute;
  top: 0;
  background: #001845;
  background: linear-gradient(
    180deg,
    rgba(0, 24, 69, 1) 45%,
    rgba(0, 24, 69, 0) 100%
  );
}

.container-top-device {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  gap: 20px;
  margin: 0;
  padding: 47px;
  z-index: 1;
  position: fixed;
  top: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 24, 69, 1) 85%,
    rgba(0, 24, 69, 0) 100%
  );
}

#containerBottom {
  position: fixed; 
  bottom: 0; 
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 24, 69, 1) 85%,
    rgba(0, 24, 69, 0) 100%
  );
}

.loginForm {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
  text-align: left;
}

.inputTitle {
  font-size: 20px;
  color: white;
  margin: 0;
  text-align: left;
  width: 100%;
  font-weight: normal;
  padding-left: 16px;
  padding-right: 16px;
  opacity: 0.7;
}

.loginInput {
  height: 62px;
  width: 100%;
  font-size: 16px;
  padding-left: 16px;
  padding-right: 16px;
  border: 2px solid #ddd;
  border-radius: 16px;
  text-align: left;
  color: white;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

.primaryButton {
  display: flex;
  width: 100%;
  flex-grow: 1;
  height: 62px;
  font-size: 20px;
  background-color: #4caf50;
  color: white;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  gap: 10px;
}

a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 5px;
  font-size: 20px;
  text-align: center;
}

h5 {
  font-size: 34px;
  margin: 0;
  padding: 0;
}

.buttonSpacer {
  display: flex;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  flex-grow: 0;
  margin: 0;
  padding: 0;
  border: none;
  background-color: transparent;
}

.status {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}
.online {
  background-color: #3abf20;
  --pulse-color: rgba(58, 191, 32, 0.7);
}
.offline {
  background-color: #f8351b;
  --pulse-color: rgba(248, 53, 27, 0.7);
}

.status::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 2s infinite;
  opacity: 0.4;
  z-index: -1;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse-color);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.loader {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loader::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.logos-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.small-logos-container {
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.login-logo {
  width: 110px;
}

.small-logo {
  width: 74px;
}

.transparentTable {
  width: 100%;
  height: 100%;
  background: none;
  border-collapse: separate;
  border-spacing: 0px 20px;
  margin: 0;
  padding: 0;
}

.transparentTable td {
  word-wrap: break-word;
  white-space: normal;
}

.transparentTable td:nth-child(2) {
  text-align: right;
  opacity: 0.8;
}

#version {
  font-size: 15px;
  color: white;
  text-align: center;
  opacity: 0.5;
  width: 100%;
  margin: 0;
  font-weight: 100;
  padding: 0 !important;
}

#versionDevice {
  font-size: 15px;
  color: white;
  text-align: center;
  opacity: 0.5;
  width: 100%;
  margin: 0;
  font-weight: 100;
  padding: 0 !important;
  background: none;
  position: fixed;
  bottom: 15px;
  z-index: 2;
}

.buttons-container {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr;
  grid-column-gap: 20px;
  grid-row-gap: 0px;
}

.two-buttons-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
  grid-column-gap: 20px;
  grid-row-gap: 0px;
}

.primaryButton {
  grid-area: 1 / 1 / 2 / 4;
}
.secondaryButton {
  grid-area: 1 / 4 / 2 / 5;
}

.secondaryButton {
  display: flex;
  width: 100%;
  flex-grow: 1;
  height: 62px;
  width: 62px;
  font-size: 20px;
  background-color: #f8351b;
  color: white;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  gap: 10px;
  justify-self: end;
}

.transparentButton {
  width: 100%;
  display: flex;
  height: 62px !important;
  font-size: 15px;
  background-color: rgba(10, 8, 8, 0.3);
  color: white;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  flex-grow: 1;
  margin: 0;
}

.squared-transparentButton {
  display: flex;
  width: 62px !important;
  height: 62px !important;
  font-size: 20px;
  background-color: rgba(10, 8, 8, 0.3);
  color: white;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  flex-grow: 1;
  margin: 0;
}

#resetText {
  text-align: center;
}

#camera {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#qr-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#scan-region {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 270px;
  height: 270px;
  border-radius: 60px;
  pointer-events: none;
  background-color: black;
  opacity: 0.3;
}

#scan-result {
  width: 270px !important;
}

.alarms-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 0;
  position: relative;
  top: 0;
}

.alarm-card {
  background-color: #002855;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  padding: 16px;
  position: relative;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.alarm-name {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.alarm-time {
  margin: 0 0 12px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.alarm-state {
  font-size: 0.9rem;
}

.alarm-severity {
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.alarm-severity.critical { background-color: #e53e3e; }
.alarm-severity.major    { background-color: #d69e2e; }
.alarm-severity.minor    { background-color: #3182ce; }
.alarm-severity.warning  { background-color: #dd6b20; }

#alarmsContainer {
  position: fixed;
  top: 220px;
  bottom: 115px;
  left: 0;
  right: 0;
  overflow-y: auto;
  box-sizing: border-box;
}

#alarmsContainer::-webkit-scrollbar {
  width: 6px;
}
#alarmsContainer::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.3);
  border-radius: 3px;
}