:root {
  --accent: #0078c0;
  --accent-soft: rgba(0, 120, 192, 0.12);
}

body {
  font-family: "Segoe UI", "Arial", sans-serif;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #334155;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: #475569;
}

.input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.file-input {
  position: relative;
  width: 100%;
}

.file-input__native {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  background: white;
}

.file-input__button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  background: var(--accent-soft);
}

.file-input__text {
  color: #64748b;
  font-size: 0.92rem;
}

.file-input__label:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 120, 192, 0.2);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  background: white;
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  padding: 0.4rem 1rem;
  font-weight: 600;
}

.btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #334155;
  color: #ffffff;
}

.alert.success {
  border-color: #16a34a;
  background: #16a34a;
}

.alert.error {
  border-color: #dc2626;
  background: #dc2626;
}

.toast-container {
  position: fixed;
  top: 5.5rem;
  right: 1.5rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  animation: toast-in 0.35s ease-out both;
  backdrop-filter: none;
}

.toast.hide {
  animation: toast-out 0.3s ease-in both;
}

.notif-button {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #dc2626;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.05rem 0.3rem;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: 2.5rem;
  width: min(360px, 90vw);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  padding: 0.75rem;
  z-index: 70;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.notif-close {
  color: #64748b;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.notif-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
}

.notif-unread {
  background: #fee2e2;
  border-color: #fecaca;
}

.notif-text {
  font-size: 0.85rem;
  color: #0f172a;
}

.notif-date {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: #64748b;
}

.notif-empty {
  font-size: 0.85rem;
  color: #64748b;
  padding: 0.75rem 0.25rem;
}

.notif-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0.6rem 0 0.4rem;
}

.notif-actions-row {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notif-read {
  opacity: 0.6;
}

.spinner {
  position: relative;
  width: 15.7px;
  height: 15.7px;
}

.spinner div {
  animation: spinner-4t3wzl 1.5s infinite backwards;
  background-color: #0078c0;
  border-radius: 50%;
  height: 100%;
  position: absolute;
  width: 100%;
}

.spinner div:nth-child(1) {
  animation-delay: 0.12s;
  background-color: rgba(0, 120, 192, 0.9);
}

.spinner div:nth-child(2) {
  animation-delay: 0.24s;
  background-color: rgba(0, 120, 192, 0.8);
}

.spinner div:nth-child(3) {
  animation-delay: 0.36000000000000004s;
  background-color: rgba(0, 120, 192, 0.7);
}

.spinner div:nth-child(4) {
  animation-delay: 0.48s;
  background-color: rgba(0, 120, 192, 0.6);
}

.spinner div:nth-child(5) {
  animation-delay: 0.6000000000000001s;
  background-color: rgba(0, 120, 192, 0.5);
}

@keyframes spinner-4t3wzl {
  0% {
    transform: rotate(0deg) translateY(-200%);
  }
  60%,
  100% {
    transform: rotate(360deg) translateY(-200%);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 60;
}

.modal-content {
  width: min(640px, 100%);
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}

.checkbox-wrapper {
  display: inline-flex;
  align-items: center;
}

.checkbox-wrapper .checkbox {
  --active: #0078c1;
  --active-inner: #fff;
  --focus: 2px rgba(0, 120, 193, 0.3);
  --border: #99b7c9;
  --border-hover: #0078c1;
  --background: #fff;
  --disabled: #adbfca;
  --disabled-inner: #adbfca;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 21px;
  outline: none;
  display: inline-block;
  vertical-align: top;
  position: relative;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--bc, var(--border));
  background: var(--b, var(--background));
  transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
}

.checkbox-wrapper .checkbox:after {
  content: "";
  display: block;
  left: 0;
  top: 0;
  position: absolute;
  transition: transform var(--d-t, 0.3s) var(--d-t-e, ease),
    opacity var(--d-o, 0.2s);
}

.checkbox-wrapper .checkbox:checked {
  --b: var(--active);
  --bc: var(--active);
  --d-o: 0.3s;
  --d-t: 0.6s;
  --d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
}

.checkbox-wrapper .checkbox:disabled {
  --b: var(--disabled);
  cursor: not-allowed;
  opacity: 0.9;
}

.checkbox-wrapper .checkbox:disabled:checked {
  --b: var(--disabled-inner);
  --bc: var(--border);
}

.checkbox-wrapper .checkbox:disabled + label {
  cursor: not-allowed;
}

.checkbox-wrapper .checkbox:hover:not(:checked):not(:disabled) {
  --bc: var(--border-hover);
}

.checkbox-wrapper .checkbox:focus {
  box-shadow: 0 0 0 var(--focus);
}

.checkbox-wrapper .checkbox:not(.switch) {
  width: 21px;
}

.checkbox-wrapper .checkbox:not(.switch):after {
  opacity: var(--o, 0);
}

.checkbox-wrapper .checkbox:not(.switch):checked {
  --o: 1;
}

.checkbox-wrapper .checkbox + label {
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  margin-left: 8px;
}

.checkbox-wrapper .checkbox:not(.switch) {
  border-radius: 7px;
}

.checkbox-wrapper .checkbox:not(.switch):after {
  width: 5px;
  height: 9px;
  border: 2px solid var(--active-inner);
  border-top: 0;
  border-left: 0;
  left: 7px;
  top: 4px;
  transform: rotate(var(--r, 20deg));
}

.checkbox-wrapper .checkbox:not(.switch):checked {
  --r: 43deg;
}

.checkbox-wrapper * {
  box-sizing: inherit;
}

.checkbox-wrapper *:before,
.checkbox-wrapper *:after {
  box-sizing: inherit;
}

.global-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  z-index: 100;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 6.4px solid #0078c1;
  animation: spinner-bulqg1 0.64s infinite linear alternate,
    spinner-oaa3wk 1.28s infinite linear;
}

@keyframes spinner-bulqg1 {
  0% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
  }
  12.5% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%);
  }
  25% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 100%);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
  }
  62.5% {
    clip-path: polygon(50% 50%, 100% 0, 100% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
  }
  75% {
    clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0% 100%);
  }
  100% {
    clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%);
  }
}

@keyframes spinner-oaa3wk {
  0% {
    transform: scaleY(1) rotate(0deg);
  }
  49.99% {
    transform: scaleY(1) rotate(135deg);
  }
  50% {
    transform: scaleY(-1) rotate(0deg);
  }
  100% {
    transform: scaleY(-1) rotate(-135deg);
  }
}
