html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top left, #ffffff, var(--mk-light));
  padding-top: 56px;
}

@media (min-width: 576px) {
  body {
    padding-top: 60px;
  }
}

body > .container {
  flex: 1 0 auto;
}

footer.footer {
  margin-top: auto;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* MeterKeeper theme colors based on logo (blue/gray) */
:root {
  --mk-primary: #2176c7;
  --mk-primary-dark: #174f88;
  --mk-gray: #4a4f58;
  --mk-light: #f5f7fb;
}

/* Navbar styling */
.mk-navbar {
  background: linear-gradient(90deg, var(--mk-primary-dark), var(--mk-primary));
  border-bottom: 2px solid var(--mk-gray);
}

.mk-navbar .navbar-brand span {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mk-navbar .nav-link {
  color: #e9edf6 !important;
}

.mk-navbar .nav-link:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Logo size in navbar */
.mk-logo {
  height: 36px;
  width: auto;
}

/* Centered login card */
.mk-login-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mk-login-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2.75rem;
  max-width: 420px;
  width: 100%;
  border-top: 4px solid var(--mk-primary);
}

.mk-login-title {
  font-weight: 500;
  color: var(--mk-gray);
  text-align: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

/* Make login logo significantly larger */
.mk-login-logo {
  display: block;
  margin: 0 auto 0.75rem auto;
  height: 144px; /* roughly 4x previous 36px base */
  width: auto;
}

.mk-login-btn {
  width: 100%;
  background: var(--mk-primary);
  border-color: var(--mk-primary);
}

.mk-login-btn:hover {
  background: var(--mk-primary-dark);
  border-color: var(--mk-primary-dark);
}

/* Validation summary styling */
.mk-login-card .validation-summary-errors {
  color: #b00020;
  margin-top: 0.75rem;
}

/* Small helper for login language selector */
.mk-login-header-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.device-row-excluded {
  background-color: #eef1f4;
  color: #6c757d;
}

.device-row-excluded > * {
  opacity: 0.8;
}

.device-row-excluded a,
.device-row-excluded button,
.device-row-excluded .badge,
.device-row-excluded input {
  opacity: 1;
}
