:host {
  color-scheme: light dark;
}

:root {
  /* Core colors */
  --bg: #ffffff;
  --fg: #111111;
  --border: #cccccc;
  --panel-bg: #efefef;
  --panel-bg-alt: #e3e3e3;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-active: #1e40af;
  --danger: #b42318;

  /* Button */
  --btn-bg: var(--bg);
  --btn-fg: var(--fg);
  --btn-border: var(--border);
  --btn-radius: 6px;

  /* Effects */
  --focus-ring: 0 0 0 2px rgba(37, 99, 235, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #e6e6e6;
    --border: #444444;
    --panel-bg: #1b1b1b;
    --panel-bg-alt: #252525;
    --accent: #4ea1ff;
    --accent-hover: #78b7ff;
    --accent-active: #2f8fff;
    --color: #fff;
    --label-color: #dcdcdc;
    --bg-login-box: #1b1b1b;

    --btn-bg: #161616;
    --btn-border: #555;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Roboto, sans-serif;
  padding: 1rem;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
}

.page-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.toprow {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.app-title {
  font-size: 1.1rem;
  font-weight: bold;
}

.hozdiv {
  display: flex;
  flex-direction: row;
  /* horizontal */
  align-items: center;
  /* vertical centering */
  gap: 1rem;
  /* space between items */

  align-items: stretch;
  /* ← THIS is the key */
}

.two-col-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.two-col-layout > section {
  min-width: 0;
  min-height: 0;
}

.left-column {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.right-column {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.right-column > * {
  min-height: 0;
  overflow: hidden;
}

.lower-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.panel-box {
  border: none;
  border-radius: 6px;
  background: var(--panel-bg);
  padding: 0.5rem;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }

  .lower-split {
    grid-template-columns: 1fr;
  }
}
.log-panel {
  height: 100%;
  min-height: 0;
}

ble-gatt-panel {
  flex: 1 1 auto;
  min-height: 0;
}

/*------------------------------------------- LOGIN - PAGE -------------------------------------------*/
/* .mt-stickybar {
    margin-top: 65px;
} */

.sky-background {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: var(--color);
}

.box,
.forgot-password-box {
  background: var(--bg-login-box);
  padding: 3rem;
  border-radius: 15px;
  width: 400px;
}
.forgot-password-box {
  width: 450px;
}
h2 {
  display: flex;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--label-color);
  font-size: 14px;
}

.form-group input {
  width: 90%;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 10px;
  background: #333;
  color: var(--color);
  font-size: 14px;
}

.login-btn {
  display: flex;
  justify-content: center;
}
.login-btn button {
  background-color: var(--color);
  color: rgb(7, 7, 7);
  border: none;
  padding: 15px 30px;
  width: 45%;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
}
.forgot-password {
  margin-bottom: 1rem;
}
.forgot-password a {
  text-decoration: none;
  color: #605dc7;
}

/*------------------------------------------- LOGIN - PAGE -------------------------------------------*/
.account-section .account-form-block {
  box-shadow: 0 1px 0 0 rgba(17, 17, 26, 0.05), 0 0 8px 0 rgba(17, 17, 26, 0.1);
  border-radius: 20px;
  padding: 3rem;
  background: var(--bg-login-box);
  width: 350px;
}
.forget-password-account-section {
  display: flex;
  justify-content: center;
}
.password-btn {
  display: flex;
  justify-content: center;
}
.password-btn button {
  padding: 15px 35px;
  border-radius: 25px;
  font-size: 16px;
  border: 0px;
}
.password-email-confirm-btn {
  display: flex;
  justify-content: center;
}
.password-email-confirm-btn button {
  padding: 9px 35px;
  border-radius: 25px;
  font-size: 16px;
  border: 0px;
}
.logo {
  display: flex;
  justify-content: center;
}
.logo img {
  width: 100%;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.toggle-password {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: var(--fg);
  z-index: 2;
}
.reset-toggle-password {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: var(--fg);
  z-index: 2;
}
.account-form-block p {
  text-align: center;
}
/* Fix Chrome autofill white background */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #333 inset !important;
  box-shadow: 0 0 0 1000px #333 inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
  border-radius: 10px;
  transition: background-color 5000s ease-in-out 0s;
}
