* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #333333;
  --muted: #999999;
  --border: #e5e5e5;
  --primary: #337ab7;
  --primary-hover: #286090;
  --danger-bg: #fcf8e3;
  --danger-border: #faebcc;
  --danger-text: #8a6d3b;
}

html.theme-dark {
  color-scheme: dark;
  --bg: #111827;
  --text: #f9fafb;
  --muted: #cbd5e1;
  --border: #374151;
  --primary: #4f9ee8;
  --primary-hover: #73b7f1;
  --danger-bg: #3f3217;
  --danger-text: #f8d477;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
}

.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.row {
  margin-right: -15px;
  margin-left: -15px;
}

.row::before,
.row::after {
  display: table;
  content: " ";
}

.row::after {
  clear: both;
}

.col-xs-1,
.col-xs-10,
.col-sm-4,
.col-sm-5 {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

.col-xs-1,
.col-xs-10 {
  float: left;
}

.col-xs-1 {
  width: 8.33333333%;
}

.col-xs-10 {
  width: 83.33333333%;
}

.col-xs-offset-1 {
  margin-left: 8.33333333%;
}

@media (min-width: 768px) {
  .col-sm-4,
  .col-sm-5 {
    float: left;
  }

  .col-sm-4 {
    width: 33.33333333%;
  }

  .col-sm-5 {
    width: 41.66666667%;
  }
}

@media (max-width: 767px) {
  .hidden-xs {
    display: none !important;
  }
}

.theme-row {
  text-align: right;
}

legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
  font-size: 21px;
  line-height: inherit;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--border);
}

.user-logo {
  width: 400px;
  max-width: 100%;
}

.admin-logo {
  max-width: 100%;
}

.login-form-col {
  min-height: 1px;
}

.alert {
  width: 50%;
  min-width: 290px;
  margin-top: 15px;
  margin-bottom: 15px;
  padding: 15px;
  border: 1px solid var(--danger-border);
  border-radius: 4px;
  background: var(--danger-bg);
  color: var(--danger-text);
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555555;
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #cccccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.user-input {
  width: 290px !important;
  max-width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #66afe9;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  border-color: #2e6da4;
}

.btn-primary:hover,
.btn-primary:focus {
  color: #ffffff;
  background: var(--primary-hover);
  border-color: #204d74;
}

.version {
  font-size: 12px;
  color: var(--muted);
}

html.theme-dark input[type="text"],
html.theme-dark input[type="password"] {
  color: #f9fafb;
  background-color: #1f2937;
  border-color: #4b5563;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
}

.theme-slider {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}

.theme-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.theme-switch input:checked + .theme-slider {
  background: var(--primary);
}

.theme-switch input:checked + .theme-slider::before {
  transform: translateX(20px);
}

@media (max-width: 480px) {
  .alert {
    width: 100%;
    min-width: 0;
  }
}
