@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  transition: all 0.3s ease;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg,#0f2027,#203a43,#2c5364);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 10px;
  overflow-x: hidden;
}

.light-theme {
  background: linear-gradient(135deg,#f1f5f9,#e2e8f0);
  color: #1e1e1e;
}

.dark-theme {
  background: linear-gradient(135deg,#0f2027,#203a43,#2c5364);
  color: #fff;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-box {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 20px 16px;
  text-align: center;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
}

.form-box h2 {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
}

.form-box select,
.form-box input[type="date"],
.form-box input[type="text"],
.form-box input[type="number"] {
  width: 100%;
  padding: 8px;
  border: none;
  border-bottom: 2px solid #03e9f4;
  background: transparent;
  color: inherit;
  font-size: 13px;
  border-radius: 4px;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-uiverse {
  padding: 8px 12px;
  margin: 5px 0;
  background: linear-gradient(90deg,#03e9f4,#3c8ce7);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.btn-uiverse:hover {
  background: linear-gradient(90deg,#1fc7f1,#569de2);
}

.theme-toggle {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 10px;
  z-index: 10;
}

.checkbox {
  display: none;
}

.label {
  position: relative;
  width: 46px;
  height: 24px;
  background: #111;
  border-radius: 50px;
  display: flex;
  align-items: center;
  padding: 5px;
  cursor: pointer;
}

.label .ball {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
}

.checkbox:checked + .label .ball {
  transform: translateX(22px);
}

.tomselect-wrapper {
  width: 100%;
  margin-bottom: 12px;
  position: relative;
}

.tomselect-wrapper .ts-control {
  background: rgba(255,255,255,0.95);
  color: #000;
  border-radius: 6px;
  font-size: 14px;
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tomselect-wrapper .ts-control input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tomselect-wrapper .ts-dropdown {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 350px !important;
  margin-top: 4px !important;
  background: rgba(255,255,255,0.95);
  border-radius: 6px;
  font-size: 14px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 999 !important;
  box-sizing: border-box !important;
}

.ts-option-trunc,
.tomselect-wrapper .ts-dropdown-content .ts-option,
.tomselect-wrapper .ts-control .item {
  display: block;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.dark-theme .tomselect-wrapper .ts-control,
.dark-theme .tomselect-wrapper .ts-control input,
.dark-theme .tomselect-wrapper .ts-dropdown,
.dark-theme .tomselect-wrapper .ts-dropdown-content .ts-option {
  background: #2c5364 !important;
  color: #000 !important;
}

select option {
  color: #000 !important;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  color: #000;
  padding: 14px;
  border-radius: 8px;
  width: 95%;
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  font-size: 14px;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.modal-content h3 {
  margin-top: 0;
}

#worksList {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
}

#worksList li {
  padding: 6px 8px;
  border-bottom: 1px solid #ccc;
  white-space: normal;
  word-break: break-word;
  text-overflow: clip;
  overflow: visible;
  margin-bottom: 6px;
  font-size: 13px;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

body {
  overflow: hidden;
  touch-action: none;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.toast.visible {
  opacity: 1;
}

#clearCacheBtn {
  z-index: 20;
  margin: 0;
}

.btn-clear-ts {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-clear-ts:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
@media (max-height: 625px) {
.form-box {overflow-y: auto; overscroll-behavior: contain;}
}
@media (max-width: 400px) {
  .form-box {
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
  }

  .btn-uiverse,
  #clearCacheBtn,
  #resetFieldsBtn {
    font-size: 13px;
    padding: 8px 12px;
  }

  .label {
    width: 46px;
    height: 24px;
  }

  .label .ball {
    width: 20px;
    height: 20px;
  }

  .checkbox:checked + .label .ball {
    transform: translateX(22px);
  }
}
.input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding-right: 70px;
}

.field-label {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  user-select: none;
}
.form-box::-webkit-scrollbar {
  width: 6px;
}
.form-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}
.btn {
display: flex;
gap:20px
}
