:root {
  --icbc-red: #c8161e;
  --icbc-text-on-red: #ffffff;
  --text-dark: #333333;
  --text-light-gray: #777777;
  --text-medium-gray: #555555;
  --border-light: #eeeeee;
  --border-medium: #dddddd;
  --bg-body: #f4f7f6;
  --bg-white: #ffffff;
  --bg-header-light: #f9f9f9;
  --success-green: #5cb85c;
  --warning-orange: #f0ad4e;
  --danger-red: #d9534f;
}

html,
body {
  height: 100%;
  margin: 0;
  background-color: var(--bg-body);
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei",
    sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 15px;
  box-sizing: border-box;
  position: relative;
}
.auth-interface {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.auth-interface .page-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 20px;
  color: var(--text-dark);
  font-weight: bold;
  flex-shrink: 0;
}
/* Global Loading & Alerts */
.global-loading-overlay {
  background-color: rgba(0, 0, 0, 0.65);
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.global-loading-spinner .glyphicon-refresh {
  color: var(--icbc-text-on-red);
  animation: spin 1.5s linear infinite;
  font-size: 30px;
}
.global-loading-overlay p {
  color: var(--icbc-text-on-red);
  margin-top: 10px;
  font-size: 16px;
}

.alert-container {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  width: 90%;
  max-width: 400px;
}
.alert {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-width: 0;
  border-left-width: 4px;
}
.alert-success {
  border-left-color: var(--success-green) !important;
}
.alert-info {
  border-left-color: #31708f !important;
}
.alert-warning {
  border-left-color: var(--warning-orange) !important;
}
.alert-danger {
  border-left-color: var(--danger-red) !important;
}

/* General Styles */
.btn {
  border-radius: 4px;
}
.form-control {
  border-radius: 4px;
}
.input-group .form-control:not(:first-child):not(:last-child) {
  border-radius: 4px;
}
.input-group-btn:last-child > .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}
.input-group-btn:first-child > .btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 4px;
  border-bottom-right-radius: 4px;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
