@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

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

:root {
  --bg-color: #ffe770;
  --sal-pink: #ffcdff;
  --sal-pink-dark: #e25adb;
  --sal-pink-dark2: #8e2089;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-color);
  min-height: 100dvh;
  padding: 40px 20px;
  color: #000;
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  flex-direction: column;
  padding-block: 10px;
  flex: 1;
  justify-content: safe center;
  &.center {
    justify-content: center;
  }
}
.logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
  }
}

.subtitle {
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 32px;
}
.card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 24px;
  /* box-shadow: -4px 4px 0px rgba(0, 0, 0, 1); */
  margin-bottom: 20px;
  h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-bottom: 16px;
  }
}

.current-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
  &.bordered {
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  }
}
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  font-size: 13px;
  &.preview {
    font-size: 16px;
    @media (max-width: 768px) {
      flex-direction: column;
      align-items: center;
      gap: 0.25em;
    }
  }
}
.status-row:not(.preview) span:nth-of-type(2) {
  text-align: right;
}
.status-row span:first-child:not(.pulse-dot) {
  opacity: 0.5;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  &.investigating {
    background: var(--sal-pink);
    color: var(--sal-pink-dark2);
  }
  &.identified {
    background: #fef08a;
    color: #a16207;
  }
  &.monitoring {
    background: #bfdbfe;
    color: #1d4ed8;
  }
  &.resolved {
    background: #bbf7d0;
    color: #15803d;
  }
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 6px;
}
input[type="password"],
input[type="text"],
textarea,
select {
  width: 100%;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
  background: #fff;
}
@media (max-width: 768px) {
  input[type="password"],
  input[type="text"],
  textarea,
  select {
    font-size: 16px;
  }
}
input:focus,
textarea:focus,
select:focus {
  box-shadow: -2px 2px 0px rgba(0, 0, 0, 1);
}
textarea {
  resize: vertical;
  min-height: 80px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  input {
    width: auto;
    margin: 0;
  }
  span {
    font-size: 14px;
  }
}

.env-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  label {
    flex: 1;
    text-align: center;
    padding: 8px;
    border: 2px solid #000;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    opacity: 1;
    margin: 0;
  }
  input[type="radio"] {
    display: none;
  }
  input[type="radio"]:checked + label {
    background: var(--bg-color);
    color: #000;
    box-shadow: -2px 2px 0px rgba(0, 0, 0, 1);
  }
}

button {
  width: 100%;
  background: var(--bg-color);
  color: #000;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.05em;
  transition: transform 0.1s;
}
button:hover {
  box-shadow: -3px 3px 0px rgba(0, 0, 0, 1);
}
button:active {
  transform: scale(0.98);
}
.button-danger {
  background: #ef4444;
  color: white;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  &.error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
  }
  &.success {
    background: #dcfce7;
    border-color: #22c55e;
    color: #15803d;
  }
}

.operational {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulse-green 2s infinite;
  flex-shrink: 0;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-block: 0.25em;
  font-size: 13px;
  opacity: 0.5;
  @media (max-width: 768px) {
    flex-direction: column;
  }
}

.footer a {
  font-weight: 600;
  text-decoration: underline;
  color: inherit;
}

.heart {
  color: #e11d48;
  opacity: 1;
}

.uptime-bars {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1rem;
}

.uptime-bar-row {
  display: flex;
  gap: 2px;
  height: 36px;
  align-items: flex-end;
}

.uptime-bar {
  flex: 1;
  height: 100%;
  border-radius: 3px;
  cursor: default;
  transition: opacity 0.15s;
}

.uptime-bar:hover {
  opacity: 0.75;
}

.uptime-bar.operational {
  background: #22c55e;
}
.uptime-bar.incident {
  background: #ef4444;
}
.uptime-bar.resolved {
  background: #eab308;
}

.uptime-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.4);
}

.button-group {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  & #resetBtn {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    & span {
      font-size: 10px;
    }
  }
}

.split-reset {
  position: relative;
  display: flex;
}

.reset-main {
  border-radius: 6px 0 0 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.reset-chevron {
  border-radius: 0 6px 6px 0;
  padding: 0 10px;
}

.reset-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 2px solid black;
  border-radius: 8px;
  box-shadow: -2px 2px 0 black;
  min-width: 150px;
  z-index: 10;
  overflow: hidden;
}

.reset-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 14px;
  color: black;
  box-shadow: none;
}

.reset-dropdown button .fa-check {
  visibility: hidden;
  width: 12px;
}

.reset-dropdown button.active .fa-check {
  visibility: visible;
}
.reset-main {
  z-index: 1;
  &:disabled {
    opacity: 1;
    background: lightgray;
    border-color: darkgray;
    pointer-events: none;
  }
}
.reset-dropdown button:last-child {
  border-bottom: none;
}

.reset-dropdown button:hover {
  background: #fef9c3;
}

.reset-dropdown.open {
  display: block;
}

.select-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.select-wrapper select {
  appearance: none;
  margin-bottom: 0;
  padding-right: 36px;
}

.select-wrapper i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  opacity: 0.5;
}
