.loading {
  background-image: url(../images/loading.gif);
  width: 100%;
  height: 100%;
  background-size: 90px 90px;
  background-color: rgba(187, 184, 184, 0.699);
  background-position: center center;
  background-repeat: no-repeat;
  position: fixed;
  z-index: 9999;
  display: none;
  pointer-events: none;
}

.btn-group .btn {
  border-radius: .25rem !important;
  margin: 0 1px !important;
  white-space: nowrap;
}

.pull-right {
  float: right;
}

.w150 {
  width: 150px;
}

/* 登入頁背景：獵槍與合格證照片（原圖順時針轉 90 度，依使用者要求不模糊）。深色漸層確保標題與表單可讀 */
body.login-page {
  background-color: #2b2622;
  background-image: linear-gradient(135deg, rgba(18, 22, 28, 0.62) 0%, rgba(18, 22, 28, 0.30) 50%, rgba(70, 45, 25, 0.20) 100%),
    url(../images/login-bg.jpg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.login-page .login-box {
  width: 440px;
  max-width: calc(100% - 32px);
  margin-top: 10vh;
}

/* 標題比登入框寬：向兩側延伸後置中 */
body.login-page .login-logo {
  margin-left: -320px;
  margin-right: -320px;
}

body.login-page .login-logo a {
  color: #fff;
  font-size: 2.6rem;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body.login-page .login-box .card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.login-page .login-box .login-card-body {
  background: transparent;
  border-radius: 0.5rem;
}

/* 手機：fixed 背景在部分行動瀏覽器會放大失真，改為一般捲動 */
@media (max-width: 767.98px) {
  body.login-page {
    background-attachment: scroll;
    background-position: center center;
  }

  body.login-page .login-box {
    width: auto;
    max-width: none;
    margin: 8vh 16px 0;
    align-self: stretch;
  }

  body.login-page .login-logo {
    margin-left: 0;
    margin-right: 0;
  }

  body.login-page .login-logo a {
    font-size: 1.6rem;
  }
}

/* 側邊欄系統名稱較長，縮小字級避免換行或被截斷 */
.main-sidebar .brand-link {
  display: flex;
  align-items: center;
}

.main-sidebar .brand-link .brand-text {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1.25;
  white-space: normal;
  letter-spacing: 0;
}

/* 登入頁版權宣告 */
body.login-page .login-copyright {
  margin: 1.25rem -220px 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

@media (max-width: 767.98px) {
  body.login-page .login-copyright {
    margin: 1rem 0 0;
    font-size: 0.9rem;
  }
}
