/* =======================================
   TABLE ROW
======================================= */

.admin__row {
  display: grid;

  width: max-content;
  min-width: 100%;

  grid-template-columns:
    220px
    250px
    120px
    220px
    120px
    180px;

  gap: 1rem;

  align-items: center;

  padding: 0.95rem 1.25rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.05);

  transition: all 0.25s ease;

  font-size: 0.8rem;

  color: rgba(255, 255, 255, 0.88);

  &:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
  }

  &:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  > div {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
  }

  &--active {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: fit-content;

    padding: 0.45rem 0.95rem;

    border-radius: 999px;

    background: rgba(34, 197, 94, 0.12);

    border: 1px solid rgba(34, 197, 94, 0.18);

    color: #22c55e;

    font-size: 0.72rem;

    font-weight: 600;

    line-height: 1;
  }

  &--notactive {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: fit-content;

    padding: 0.45rem 0.95rem;

    border-radius: 999px;

    background: rgba(239, 68, 68, 0.12);

    border: 1px solid rgba(239, 68, 68, 0.18);

    color: #ef4444;

    font-size: 0.72rem;

    font-weight: 600;

    line-height: 1;
  }

  &--actions {
    display: flex;

    align-items: center;

    gap: 0.55rem;
  }

  &--edit,
  &--delete {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    height: 36px;

    padding: 0 1rem;

    border-radius: 10px;

    font-size: 0.75rem;

    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

    transition: all 0.25s ease;
  }

  &--edit {
    background: rgba(247, 147, 24, 0.12);

    border: 1px solid rgba(247, 147, 24, 0.18);

    color: #f79318;

    &:hover {
      background: rgba(247, 147, 24, 0.18);

      transform: translateY(-1px);
    }
  }

  &--delete {
    background: rgba(239, 68, 68, 0.12);

    border: 1px solid rgba(239, 68, 68, 0.18);

    color: #ef4444;

    &:hover {
      background: rgba(239, 68, 68, 0.18);

      transform: translateY(-1px);
    }
  }
}

/* =======================================
   SKELETON ROWS
======================================= */

.skeleton__row {
  display: grid;

  width: max-content;

  min-width: 100%;

  grid-template-columns:
    220px
    250px
    120px
    220px
    120px
    180px;

  gap: 1rem;

  align-items: center;

  padding: 1rem 1.25rem;
}

.skeleton__cell {
  height: 14px;

  border-radius: 999px;

  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.09),
    rgba(255, 255, 255, 0.04)
  );

  background-size: 400px 100%;

  animation: shimmer 1.5s linear infinite;
}

/* =======================================
   MODAL OVERLAY
======================================= */

.modalOverlay {
  position: fixed;

  inset: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 1rem;

  background: rgba(4, 4, 6, 0.82);

  backdrop-filter: blur(14px);

  z-index: 9999;

  overflow-y: auto;

  &::-webkit-scrollbar {
    display: none;
  }
}

/* =======================================
   MODAL
======================================= */

.modal {
  position: relative;

  width: 100%;

  max-width: 560px;

  padding: 2rem;

  border-radius: 22px;

  background: linear-gradient(
    180deg,
    rgba(22, 22, 24, 0.98),
    rgba(15, 15, 18, 1)
  );

  border: 1px solid rgba(255, 255, 255, 0.05);

  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);

  animation: modalFade 0.25s ease;

  h3 {
    color: #ffffff;

    font-size: 1rem;

    font-weight: 600;

    margin-bottom: 0.45rem;
  }

  p {
    color: rgba(255, 255, 255, 0.72);

    font-size: 0.82rem;

    line-height: 1.8;

    margin-bottom: 1.5rem;
  }

  label {
    display: block;

    margin-bottom: 0.45rem;

    color: #d0d0d0;

    font-size: 0.8rem;

    font-weight: 500;
  }

  input,
  select,
  textarea {
    width: 100%;

    background: #1e1e1e;

    border: 1px solid #333333;

    border-radius: 12px;

    padding: 0.78rem 1rem;

    font-size: 0.84rem;

    color: #ffffff;

    margin-bottom: 1rem;

    transition: all 0.25s ease;

    &:focus {
      outline: none;

      border-color: rgba(247, 147, 24, 0.35);

      box-shadow: 0 0 0 3px rgba(247, 147, 24, 0.08);
    }

    &::placeholder {
      color: #777777;
    }
  }

  textarea {
    resize: vertical;

    min-height: 130px;

    line-height: 1.8;
  }
}/* =======================================
   PASSWORD INPUT
======================================= */

.passwordWrapper {
  position: relative;

  display: flex;

  align-items: center;

  margin-bottom: 1rem;

  input {
    margin-bottom: 0;

    padding-right: 3rem;
  }

  button {
    position: absolute;

    right: 0.9rem;

    top: 50%;

    transform: translateY(-50%);

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    background: transparent;

    color: rgba(255, 255, 255, 0.55);

    cursor: pointer;

    transition: color 0.25s ease;

    svg {
      font-size: 1rem;
    }

    &:hover {
      color: #f79318;
    }
  }
}

/* =======================================
   MODAL FOOTER
======================================= */

.modalFooter {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 0.8rem;

  margin-top: 2rem;

  padding-top: 1.4rem;

  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =======================================
   BUTTONS
======================================= */

.primaryButton,
.secondaryButton,
.dangerButton {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 0.55rem;

  height: 46px;

  padding: 0 1.4rem;

  border-radius: 12px;

  font-size: 0.82rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.25s ease;

  white-space: nowrap;

  &:disabled {
    opacity: 0.55;

    cursor: not-allowed;

    transform: none;
  }
}

.primaryButton {
  border: none;

  background: linear-gradient(
    135deg,
    #f79318,
    #ff9f2f
  );

  color: #101114;

  &:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow: 0 14px 30px rgba(247, 147, 24, 0.28);
  }
}

.secondaryButton {
  background: rgba(255, 255, 255, 0.04);

  border: 1px solid rgba(255, 255, 255, 0.06);

  color: #ffffff;

  &:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
  }
}

.dangerButton {
  border: none;

  background: linear-gradient(
    135deg,
    #ef4444,
    #dc2626
  );

  color: #ffffff;

  &:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.25);
  }
}

/* =======================================
   CLOSE BUTTON
======================================= */

.closeButton {
  position: absolute;

  top: 1rem;

  right: 1rem;

  width: 36px;

  height: 36px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 10px;

  border: 1px solid rgba(255, 255, 255, 0.06);

  background: rgba(255, 255, 255, 0.04);

  color: rgba(255, 255, 255, 0.7);

  cursor: pointer;

  transition: all 0.25s ease;

  svg {
    font-size: 0.95rem;
  }

  &:hover {
    background: rgba(255, 255, 255, 0.08);

    color: #ffffff;

    transform: rotate(90deg);
  }
}

/* =======================================
   EMPTY STATE
======================================= */

.emptyState {
  display: flex;

  align-items: center;

  justify-content: center;

  padding: 4rem 2rem;
}

/* =======================================
   SHIMMER ANIMATION
======================================= */

@keyframes shimmer {
  0% {
    background-position: -450px 0;
  }

  100% {
    background-position: 450px 0;
  }
}

/* =======================================
   MODAL FADE
======================================= */

@keyframes modalFade {
  from {
    opacity: 0;

    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;

    transform: translateY(0) scale(1);
  }
}

/* =======================================
   MOBILE
======================================= */

@media (max-width: 768px) {
  .modal {
    width: 100%;

    max-width: 100%;

    padding: 1.5rem;

    border-radius: 18px;
  }

  .modalFooter {
    flex-direction: column;

    gap: 0.75rem;

    button {
      width: 100%;
    }
  }

  .admin__row {
    grid-template-columns:
      200px
      220px
      110px
      180px
      110px
      170px;

    padding: 0.9rem 1rem;
  }

  .skeleton__row {
    grid-template-columns:
      200px
      220px
      110px
      180px
      110px
      170px;

    padding: 0.9rem 1rem;
  }

  .passwordWrapper button {
    right: 0.8rem;
  }
}