@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');

:root {
  --facet: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  --facet-sm: polygon(0 6px, 6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

html, body { background: #F7F7FA; }

::selection { background: #EEF0FF; color: #362E9E; }

.facet { clip-path: var(--facet); }
.facet-sm { clip-path: var(--facet-sm); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #E4E4EA; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #4A4E5C; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  border: 2.5px solid #EEF0FF;
  border-top-color: #1A73E8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #EEEEF2 25%, #F7F7FA 50%, #EEEEF2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #14171F;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(20,23,31,0.12);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1000;
  max-width: 90vw;
}
.toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.toast.error { background: #DC2626; }
.toast.success { background: #16A34A; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 23, 31, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-overlay .modal-box {
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4338CA, #6D5CE0);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.avatar-sm { width: 34px; height: 34px; font-size: 12.5px; border-radius: 9px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 5px;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  color: #4A4E5C;
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover { background: #F7F7FA; color: #14171F; }

.brand-mark { width: 26px; height: 26px; background: linear-gradient(135deg, #4338CA, #6D5CE0); flex-shrink: 0; }
.brand-mark-lg { display:block; width: 48px; height: 48px; background: linear-gradient(135deg, #4338CA, #8B7CF0); }

.cube-spinner {
  width: 70.4px;
  height: 70.4px;
  --clr: #1A73E8;
  --clr-alpha: rgba(26, 115, 232, 0.1);
  animation: cube-spinner-anim 1.6s infinite ease;
  transform-style: preserve-3d;
}

.cube-spinner > div {
  background-color: var(--clr-alpha);
  height: 100%;
  position: absolute;
  width: 100%;
  border: 3.5px solid var(--clr);
}

.cube-spinner div:nth-of-type(1) { transform: translateZ(-35.2px) rotateY(180deg); }
.cube-spinner div:nth-of-type(2) { transform: rotateY(-270deg) translateX(50%); transform-origin: top right; }
.cube-spinner div:nth-of-type(3) { transform: rotateY(270deg) translateX(-50%); transform-origin: center left; }
.cube-spinner div:nth-of-type(4) { transform: rotateX(90deg) translateY(-50%); transform-origin: top center; }
.cube-spinner div:nth-of-type(5) { transform: rotateX(-90deg) translateY(50%); transform-origin: bottom center; }
.cube-spinner div:nth-of-type(6) { transform: translateZ(35.2px); }

@keyframes cube-spinner-anim {
  0% { transform: rotate(45deg) rotateX(-25deg) rotateY(25deg); }
  50% { transform: rotate(45deg) rotateX(-385deg) rotateY(25deg); }
  100% { transform: rotate(45deg) rotateX(-385deg) rotateY(385deg); }
}
