*,
*::before,
*::after {
  box-sizing: border-box;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 9999;
}
header .elems {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin: 5px 12px;
}
.header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  white-space: nowrap;
}
.user-chip-label {
  opacity: 0.85;
  font-weight: 600;
}
.logoutBtn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.logoutBtn:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}
.logoutBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.elems h1 {
  margin: 10px 0;
  transition: all 0.5s ease;
  color: #fff;
  justify-self: center;
  text-align: center;
}
.elems svg {
  height: 50px;
}
.svg-container {
  width: 50px;
  height: 50px;
  cursor: pointer;
  margin: 0 12px;
}
.icon-solid {
  fill: #fff;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.icon-gradient {
  fill: url(#hoverGradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.svg-container:hover .icon-solid {
  opacity: 0;
}
.svg-container:hover .icon-gradient {
  opacity: 1;
}
header .backBtn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
header .backBtn:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #667eea;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 44px; /* место под footer */
  box-sizing: border-box;
  overflow-x: hidden;
}

.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  padding: 10px 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px;
  max-width: 500px;
  width: 100%;
  position: relative;
}
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  z-index: -1;
}
h1 {
  color: #fff;
  text-align: center;
  margin-top: 5px;
  margin-bottom: 30px;
  font-size: 28px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
input[type='date'],
select {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.startEndDate {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}
.startEndDate > div {
  min-width: 170px;
  width: 49%;
}
input[type='date'] {
  -webkit-appearance: none;
  appearance: none;
}
#teacherSelect {
  cursor: pointer;
}
input[type='date']::-webkit-calendar-picker-indicator {
  color: rgba(255, 255, 255, 0.8);
  opacity: 1;
  cursor: pointer;
  filter: invert(1);
  width: 20px;
  height: 20px;
}
input[type='date']::-webkit-inner-spin-button,
input[type='date']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='date']::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.6);
}
input[type='date']:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  outline: 0;
}
input[type='date']:hover {
  background: rgba(255, 255, 255, 0.15);
}
select option {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
}
.checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
input[type='checkbox'] {
  display: none;
}
.custom-checkbox {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  margin-right: 10px;
}
.custom-checkbox:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
input[type='checkbox']:checked + .custom-checkbox {
  background: rgba(255, 255, 255, 0.3);
}
.custom-checkbox::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s;
  border-radius: 2px;
}
input[type='checkbox']:checked + .custom-checkbox::after {
  transform: translate(-50%, -50%) scale(1);
}
.checkbox-container label {
  margin-bottom: 0;
  cursor: pointer;
}
input[type='date']:disabled {
  opacity: 0.3;
  filter: grayscale(50%);
  pointer-events: none;
  transform: scale(0.95);
  transition: all 0.3s ease;
}
.container button {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 15px 25px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  width: 100%;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.container button:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}
br {
  display: none;
}
@keyframes spin {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}
@media (max-width: 768px) {
  body {
    padding: 0 10px;
  }
  .elems h1 {
    display: none;
  }
  .container {
    max-width: 100%;
    padding: 20px;
    border-radius: 15px;
  }
  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  input[type='date'],
  select {
    padding: 10px;
    font-size: 14px;
    margin-bottom: 15px;
  }
  .checkbox-container {
    margin-bottom: 15px;
  }
  .custom-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }
  .custom-checkbox::after {
    width: 6px;
    height: 6px;
  }
  .container button {
    padding: 12px 20px;
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  body {
    padding: 0 5px;
  }
  .container {
    padding: 10px;
    border: none;
    border-radius: 10px;
  }
  h1 {
    font-size: 32px;
    margin-bottom: 20px;
  }
  label {
    font-size: 18px;
    margin-bottom: 10px;
  }
  input[type='date'],
  select {
    padding: 12px;
    font-size: 18px;
    margin-bottom: 15px;
  }
  .checkbox-container {
    margin-bottom: 15px;
  }
  .custom-checkbox {
    width: 24px;
    height: 24px;
    margin-right: 10px;
  }
  .custom-checkbox::after {
    width: 10px;
    height: 10px;
  }
  .container button {
    padding: 18px 30px;
    font-size: 20px;
  }
}

/* ===== Auth overlay (login/password) ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  padding: 22px;
  color: #fff;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  opacity: 0.9;
  text-align: center;
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #fff;
}

.auth-input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  outline: 0;
}

.auth-input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.auth-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 60, 60, 0.18);
  border: 1px solid rgba(255, 60, 60, 0.35);
  color: #fff;
  font-size: 14px;
}

.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.auth-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
}
