/* Загальні стилі */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    

    body {
      font-family: Arial, sans-serif;
      background-color: #f4f7fc;
      display: flex;
      flex-direction: column;
      height: 100vh;
    }
    .app{
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    /* Навігаційна панель */
    .navbar {
      background-color: #007bff;
      color: white;
      padding: 15px;
      text-align: center;
      font-size: 18px;
      font-weight: bold;
    }

    /* Контейнер для форми */
    .container {
      display: flex;
      justify-content: center;
      align-items: center;
      flex: 1;
      height: 60%;
    }

    .login-form {
      background-color: #fff;
      padding: 30px;
      border-radius: 30px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      width: 100%;
      max-width: 400px;
      text-align: center;
      transition:.3s;
      animation: anim-in-top .3s ease-in;
    }
    .journal-form {
      background-color: #fff;
      padding: 30px;
      border-radius: 30px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      width: 100%;
      max-width: 90%;
      text-align: center;
      animation: anim-in-top .3s ease-in;
      height: 80%;
    }
    .journal-form .log-table{
      max-height: 80%;
      max-width: 100%;
      overflow: auto;
    }

    /* Заголовок */
    h2 {
      margin-bottom: 20px;
      font-size: 24px;
      color: #333;
    }

    /* Поля вводу */
    label {
      display: block;
      margin:15px;
      font-size: 14px;
      color: #555;
    }

    input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 15px;
        font-size: 14px;
        outline: none;
        transition: .5s;
    }

    input:focus {
      border-color: #007bff;
    }

    /* Кнопка */
    button {
      width: 100%;
      padding: 10px;
      background-color: #007bff;
      color: white;
      border: none;
      border-radius: 15px;
      font-size: 16px;
      cursor: pointer;
      transition: .5s;
    }

    button:hover {
      background-color: #005dc2;
    }
    .password-toggle:hover{
        background-color: #e6f2ff;
    }
    /* Кнопка для показу паролю */
    .password-container {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 20px;
        gap: 5px;
    }

    .password-toggle {
        background: none;
        border: none;
        color: #007bff;
        font-size: 18px;
        cursor: pointer;
        width:auto;
        align-content: center;
        margin: 0;
        padding: 5px;
        height: 100%;
        width: auto;
        border-radius: 15px;
        float: right;
        top: 0;
        position: absolute;
        right: 0px;
        height: 100%;
        transition: .3s;
    }
    .b-none{
        display:none;
    }

/* Форма для вибору дат */
.date-selection {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.date-selection input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.date-selection button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.date-selection button:hover {
  background-color: #005dc2;
}

/* Таблиця журналу */
.log-table {
  display: flex;
  /*justify-content: center;*/
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 30px;
  overflow: hidden;
  margin:15px;
}

td,th{
    border-right: 1px solid #ddd;
        padding:5px 10px;
  text-align: center;
}
td:last-child,th:last-child{
    border-right: 0px solid #ddd;
}
tr{
  border-top: 1px solid #ddd;
  background-color: #daecff;
}
tr:first-child{
  border-top: 0px solid #ddd;
}

th {
  background-color: #007bff;
  color: white;
}

td button {
  background: none;
  border: none;
  color: #007bff;
  font-size: 16px;
  cursor: pointer;
}
.journal-form button{
    width: auto;
}

td button:hover {
  color: #005dc2;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 45px;
  aspect-ratio: .75;
  --c: no-repeat linear-gradient(#000 0 0);
  background: 
    var(--c) 0%   50%,
    var(--c) 50%  50%,
    var(--c) 100% 50%;
  animation: l7 1s infinite linear alternate;
  margin: auto;
}
@keyframes l7 {
  0%  {background-size: 20% 50% ,20% 50% ,20% 50% }
  20% {background-size: 20% 20% ,20% 50% ,20% 50% }
  40% {background-size: 20% 100%,20% 20% ,20% 50% }
  60% {background-size: 20% 50% ,20% 100%,20% 20% }
  80% {background-size: 20% 50% ,20% 50% ,20% 100%}
  100%{background-size: 20% 50% ,20% 50% ,20% 50% }
}


.admin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  animation: anim-in-top .3s ease-in;
}
.admin-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width:80%;
  width:auto;
  max-height: 80vh;
}
.admin-btn {
  padding: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
  width: 200px;
  text-align: center;
  margin:2px;
}

.admin-btn:hover {
  background-color: #005dc2;
}

.admin-btn:focus {
  outline: none;
}
.btn-navbar{
  background-color: #0070e8;
}




.admin-container2 {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  padding-top: 20px;
}
.admin-buttons2 {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 300px;
  padding: 20px;
  background-color: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width:90%;
  width:500px;
  max-height: 80vh;
}

#list {
  list-style-type: none;
  padding-left: 0;
  overflow-y:auto;
}

#list > li {
  padding: 10px;
  background-color: #f8f9fa;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-radius:15px;
  animation: scale-in .3s ease-in;
}

.edit-btn, .delete-btn, .add-btn, .detach-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 16px;
  width:auto;
  margin-left:10px;
}
.d-name{
  width:100%;
  font-size: 18px;
  padding: 0 8px;
}
.edit-btn:hover, .delete-btn:hover, .add-btn:hover, .detach-btn:hover {
  color: #005dc2;
}



#employee-list {
  list-style-type: none;
  padding-left: 0;
}

#employee-list li {
  padding: 10px;
  background-color: #f8f9fa;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px;
}

.employee-info {
  width: 100%;
}

.edit-btn, .delete-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
}

.edit-btn:hover, .delete-btn:hover {
  color: #005dc2;
}

/* Кнопка для додавання працівника */
#add-employee-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 20px;
}

#add-employee-btn:hover {
  background-color: #005dc2;
}


.modal#active {
	transform: scale(1);
    opacity: 1;
    filter:opacity(1);
	transition: filter, opacity 0.3s;
	pointer-events: auto;
}
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 900;
	transform: scale(0);
    opacity: 0;
    filter:opacity(0);
    background-color: rgba(0,0,0,0.7);
	padding: 15px;
	margin: 0;
	overflow: hidden;
    transition: 0.5s,0.5s,0.3s;  
    transition-delay: 0s, 0s, 5s;

    transition-duration: 0.5s, 0.5s, 0s;
	transition-property: filter, opacity,transform;
	transition-delay: 0s, 0s, 0.6s;
}
.modal .modalWindow#hidden{
    opacity:0;
    filter:opacity(0);
    transform: translate(-50%,-200%) scale(0.3);
}
.modal .modalWindow {
	position: absolute;
	display: block;
	z-index: 902;
	top: 50%;
	margin-left: 50%;
	background-color: rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 8px;
    #border:5px solid #E5F5FF;
	border-radius: 30px;
    padding:15px;
    display:flex;
    flex-direction: column;
    align-items: center;
    gap:20px;
	box-sizing: border-box;
	width: 500px;
    max-width: 100%;
    max-height: 70vh;
    overflow: auto;
	transition: .3s;
    font-family: "Montserrat Alternates"; 
    font-style:normal;
    font-weight: 500; 
    opacity:1;
    filter:opacity(1);
    transform: translate(-50%,-50%) scale(1);
}
.modal .modalWindow.type2{
    width:80%;
}
.modal .modal-title{
    background-color: #f5f5f5;
    width: 100%;
    font-size: 24px;
    padding:20px;
    color: #333;
    font-weight: bold;
    text-align: center;
    margin-top: -20px;
    border-radius: 0px 0px 20px 20px;
}
.modal-message{
    color: #555;
    font-size: 20px;
    #max-height: 40vh;
    width:100%;
    overflow-y: auto;
    text-wrap: auto;
}
.modal-message::-webkit-scrollbar {
    width:4px;
    background: rgba(245,252,255,0.1);
}
.modal-message::-webkit-scrollbar-thumb {
    background: #eee;
    border-radius: 10px;
    max-height: 10px;
}
.modal-buttons{
    display:flex;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    width:100%;
}
.modalWindow button{
      width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    cursor: pointer;
    transition: .5s;
    transform:scale(1);
    max-width: 47%;
    flex: 1 0 auto;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    /*background-color: #007bff;
    color:#fff;
    padding:12px 24px;
    border-radius:10px;
    font-family: "Montserrat Alternates"; 
    font-style:normal;
    font-weight: 500; 
    font-size: 18px;
    cursor:pointer;
    transform:scale(1);
    border:0;
    transition: .5s;
    max-width: 48%;
    flex: 1 0 auto;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;*/
}
.modalWindow button:hover{
    transform: scale(0.9);
    background-color: #59B8FF;
}




.modalWindow .form{
    display:flex;
    flex-direction: column;
    width:100%;
    gap:20px;
}
.modalWindow textarea,.modalWindow input, .modalWindow select{
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 14px;
    outline: none;
    transition: .5s;

}
.modalWindow textarea::placeholder,.modalWindow input::placeholder{
    color:#CCE9FC;
}
.modalWindow .subjects div{
    padding:5px;
    background-color: #0087e6;
    color:#CFDCE6;
    transform:scale(1);
    transition:.3s;
    border-radius:15px;
    cursor:pointer;
}
.modalWindow .subjects div:hover{
    padding:5px;
    transform:scale(0.9);
    transition:.3s;
    border-radius:15px;
}
.errors{
    position:fixed;
    top:0;
    left:50%;
    transform: translate(-50%,0);
    width:100%;
    max-width:500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "Montserrat Alternates"; 
    font-size:23px;
    font-style:normal;
    /*font-weight: bold;*/ 
     -webkit-user-select: none;
     pointer-events: none;
    user-select: none;
    outline:none;
    padding:24px 0;
    gap:24px;
    z-index: 905;
}
.errors .error{
    /* padding:8px 24px; */
    padding:20px;
    display: flex;
    position:relative;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap:8px;
    border-radius: 20px;
    z-index: 10;
    text-align:center;
    overflow: hidden;
    transform: scale(0) translateY(-24px);
    opacity:0;
    filter: opacity(0);
    max-height: 0;
    transition: .5s;
}
.errors .error::after{
    content: '';
    display: block;
    position: absolute;
    bottom:-1px;
    left:50%;
    width:80%;
    height:6px;
    transform: translate(-50%,0);
    background-color: rgba(0,0,0,0.05);
    border-radius: 5px;
}
.errors .error#showed{
    animation: error-out .5s ease-in;
    animation-fill-mode: forwards;
    animation-delay: 3s;
    max-height: 500px;
    transform: scale(1) translateY(0);
    opacity:1;
    filter: opacity(1);
    max-height: 500px;
    transition: .5s;
}
.errors .error#showed::after{
    animation: error-line 3s ease-in;
    animation-fill-mode: forwards;
}
.errors .error.success{
    color:#36993d;
    background-color: #74EB7D;
    border:2px solid #00d96e;
}

.errors .error.fail{
    color:#a54646;
    background-color: #FE8585;
    border:2px solid #e36c70;
}

@keyframes error-line {
    from{
        width:80%;
    }
    to{
        width:0;
    }
}

@keyframes error-out {
    from{
        transform: scale(1) translateY(0px);
        opacity:1;
        filter: opacity(1);
        max-height: 500;
        margin-top:0;
    }
    to{
        transform: scale(0) translateY(-200px);
        opacity:0;
        filter: opacity(0);
        max-height: 0;
        margin-top:-48px;
    }
}


@media only screen and (max-width : 650px) {
	.modal{
		padding:0;
	}
    .modalWindow {
	    position: absolute;
	    display: block;
	    z-index: 902;
	    margin-top: 10%;
	    margin-left: 5%;
	    background-color: var(--main_bg_input);
	    box-shadow: 0 0 15px 0px rgb(0, 0, 0, 1);
	    border-radius: 20px;
	    box-sizing: border-box;
	    width: 90%;
	    transition: 1.5s;
	    font-family: sans-serif;
	    color: var(--login_text_color);
    }
    .modal .modalWindow {
        margin-top: 5%;
    }
}




@keyframes anim-in-top{
	0%{
		opacity: 0;
        filter: opacity(0);
		transform: scale(0.6) translateY(-100px);
	}
	100%{
		opacity: 1;
        filter: opacity(1);
		transform: scale(1) translateY(0);
	}
}

@keyframes error-line {
    from{
        width:80%;
    }
    to{
        width:0;
    }
}

@keyframes error-out {
    from{
        transform: scale(1) translateY(0px);
        opacity:1;
        filter: opacity(1);
        max-height: 500;
        margin-top:0;
    }
    to{
        transform: scale(0) translateY(-200px);
        opacity:0;
        filter: opacity(0);
        max-height: 0;
        margin-top:-48px;
    }
}
@keyframes anim-in-top-center{
	0%{
		opacity: 0;
        filter: opacity(0);
		transform: scale(0.6) translate(-75%,0%);
	}
	100%{
		opacity: 1;
        filter: opacity(1);
		transform: scale(1) translate(-50%,-50%);
	}
}
@keyframes animation-opacity{
	0%{
        filter: opacity(0);
		opacity: 0;
	}
	100%{
        filter: opacity(1);
		opacity: 1;
	}
}

@keyframes scale-in {
	0%{
		transform: scale(0);
	}
	100%{
		transform: scale(1);
	}
}
@keyframes element-in {
	from {
		transform: scale(0) translateY(200vh);
	}

	to {
		transform: scale(1) translateY(1);
	}
}

/* Стилі для сторінки 404 */
.error-page {
  background-color: #fff;
  padding: 30px;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  text-align: center;
  margin-top: 50px;
  animation: anim-in-top .3s ease-in;
}

.error-page h2 {
  font-size: 36px;
  color: #333;
}

.error-page p {
  font-size: 18px;
  color: #555;
  margin-top: 20px;
}

.error-page button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 30px;
}

.error-page button:hover {
  background-color: #005dc2;
}


.department-item {
  background-color: #f8f9fa;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
.department-item .department{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width:100%;
}

.db-container {
  margin-top: 10px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom:-10px;
}

.db-list {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: row;
  gap:10px;
}

li.db{
  background-color: #e8f3ff;
  padding: 8px;
  border-radius: 15px;
  width:auto;
  display: flex;
  align-items: center;
  color:#333333;
  font-weight: bold;
  justify-content: space-between;
}
.db button{
  font-size:10px;
  transition:.2s;
}

.db-container::-webkit-scrollbar {
  height: 6px; /* Висота скролу */
}

.db-container::-webkit-scrollbar-track {
  background-color: #e6f1ff; /* Колір фону треку */
  border-radius: 10px;
}

.db-container::-webkit-scrollbar-thumb {
  background-color: #a4cafa; /* Колір скролу */
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.db-container::-webkit-scrollbar-thumb:hover {
  background-color: #71b1ff;/* Колір при наведенні */
}


.checkbox {
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  user-select: none;
  background-color: #eee;
  padding: 10px;
  margin:5px;
}

/* ховаємо стандартний checkbox */
.checkbox input {
    position: absolute;
    opacity: 0;
    width:0;
}

/* кастомний чекбокс */
.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

/* галочка */
.checkmark::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

/* checked */
.checkbox input:checked + .checkmark {
    background: #4f46e5;
    border-color: #4f46e5;
}

.checkbox input:checked + .checkmark::after {
    opacity: 1;
}

/* hover */
.checkbox:hover .checkmark {
    border-color: #4f46e5;
}
