* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  background-color: #f5f7fa;
}

.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;
}

/* 顶部导航 */
.app-navbar {
  background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.app-navbar .nav-link:hover {
  color: #fff;
}

.app-footer {
  border-top: 1px solid #e9ecef;
}

/* 卡片统一 */
.card {
  border-radius: 0.6rem;
}

/* 周课表 */
.schedule-grid {
  font-size: 0.82rem;
}

.schedule-grid th,
.schedule-grid td {
  text-align: center;
  vertical-align: middle;
  padding: 0.35rem;
}

.schedule-grid .col-slot {
  width: 90px;
  background-color: #f0f3f8;
  font-weight: 600;
  color: #334;
}

.slot-cell {
  min-width: 110px;
  height: 52px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.slot-cell:hover {
  background-color: #dbeafe;
}

.slot-cell.holiday,
th.holiday {
  background-color: #fff3cd !important;
}

.slot-cell.holiday:hover {
  background-color: #ffe08a !important;
}

.slot-cell.makeup,
th.makeup {
  background-color: #eaf6ea !important;
}

.slot-cell.makeup:hover {
  background-color: #d8eed8 !important;
}

.holiday-badge {
  display: inline-block;
  font-size: 0.68rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 3px;
  vertical-align: top;
}

.holiday-badge.badge-rest {
  background-color: #fde2e2;
  color: #c0392b;
}

.holiday-badge.badge-work {
  background-color: #e2f5e2;
  color: #1e7e34;
}

.sch-item {
  background-color: #e7f0ff;
  border: 1px solid #bcd4ff;
  border-radius: 6px;
  padding: 3px 4px;
  margin: 2px 0;
  text-align: left;
  line-height: 1.25;
}

.sch-item .sch-class {
  font-weight: 600;
  color: #1e3c72;
}

.sch-item .sch-item-name {
  color: #14532d;
}

.sch-item .sch-teacher {
  color: #6c757d;
  font-size: 0.75rem;
}

.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;
}
